Resolving the installer database errors and warnings on the install report
Seeing database errors or warnings on the installer report after a backup restoration? Most trace back to a handful of well-known causes, and each one has a specific fix below.
This guide covers resolving database errors and warnings on the Duplicator Pro installer report, from collation mismatches to oversized queries.
Write Errors
During installation, errors and warnings related to the database are typically tied to data from the [hash]-dump.sql file that fails to insert into the new database. Queries that error during installation are recorded in the installer log. Open installer-log.txt and search for the DATABASE RESULTS section, where errors are marked ERROR. Duplicator Pro links directly to installer-log.txt from any error notice shown during the install, so there’s no need to browse the server manually to find it.
The most common causes include:
- Database Versions: Incompatibilities may occur if the MySQL versions differ significantly across servers. Confirm the destination server’s MySQL or MariaDB version is equal to or newer than the source server’s version before troubleshooting further.
- MySQL Mode: The MySQL Mode can affect how the MySQL engine processes queries.
Setting MySQL Mode to NO_ENGINE_SUBSTITUTION
If installer-log.txt shows “database error write ‘Invalid default value…'”, set the MySQL Mode to NO_ENGINE_SUBSTITUTION. We recommend setting this initially if many database errors occur.
- On Step 1 of the installer, switch to Advanced Mode.
- Open the Database tab and locate the Mode field.
- Continue with the installation.
- After the install completes, check the installer log (link available in the upper right-hand corner) for errors.
Experiment with various combinations to determine what works best for your server. Once you identify a working configuration, work with your host or server admin to set these values permanently in the my.ini file.
Common Error Strings and Fixes
| Error | Cause | Fix |
|---|---|---|
| Unknown collation | The destination MySQL/MariaDB version doesn’t support the source collation | See What Is Compatibility Mode and “Unknown Collation” Errors? |
| MySQL server has gone away / packet too large | A query exceeds max_allowed_packet | Increase max_allowed_packet in my.cnf or my.ini (see Query Size Limit Errors below) |
| Data too long for column | Charset mismatch between source and destination | Compare the source charset (usually utf8mb4) against the destination database’s charset |
| Table ‘X’ already exists | Tables left behind from a previous install attempt | Drop all tables in the destination database, or enable Remove All Tables, before re-running |
| Duplicate entry for PRIMARY KEY | An AUTO_INCREMENT conflict from a partial previous import | Drop all tables and re-run the install from a clean database |
| Access denied for user | Incorrect database credentials | Re-enter the correct database credentials in Step 2 |
| Serialized data error on table X | A PHP serialized string could not be parsed | See Serialization Notices below |
Query Size Limit errors
If you encounter errors related to the ‘Query size limit’, it means the data payload exceeds what is allowed by your MySQL configuration. To resolve this, edit your my.cnf (or my.ini) configuration file and add or update the max_allowed_packet setting, for example max_allowed_packet=64M. For more detail, see MySQL packet size.
Installer Report Overview
The installer report on the final step is designed to highlight potential issues with the installation. Note that in some cases, you might receive errors or notices that do not affect your site’s overall functionality. If your site is stable and the Deploy/Update result count is low (under 10), you can typically ignore these minor errors or notices.
Update Errors
These are basic query statements that encountered issues during execution on the new server. They may be caused by data integrity problems or incompatibilities between different MySQL versions. If errors appear here, inspect the query and debug the migration issue.
Table Key Notices
These notices occur when a table’s new URL value is detected but cannot be updated because there is no corresponding table key. Locate and update these values manually.
Serialization Notices
PHP serialization issues can occur when internal values change. Duplicator Pro attempts to repair serialized strings automatically, but in rare cases they aren’t updated correctly. To fix a serialized string manually:
- Locate the problematic serialized string using the query provided in the installer report.
- Visit unserialize.onlinephp.io.
- Paste in the serialized string, for example
a:1:{s:4:"Test";s:17:"unserialize here!";}. The segments:4:"Test";denotes a string with 4 characters. If the character count doesn’t match the actual string length, unserializing throws an error. - Adjust the character count to match the actual string length to fix the issue.
Quick Check
If you receive any errors on the installer report, follow these steps:
- Confirm the site works correctly. If it’s stable and the error count is low, re-save settings for the affected theme, plugin, or widget.
- If you remain concerned, run the SQL queries provided in the installer report and review the error log to assess problematic queries. You can also perform this check using phpMyAdmin.
That’s it! Following the steps in this guide resolves the most common database errors and warnings on the Duplicator Pro install report, so your migration or restoration finishes cleanly.
Also see:
How to fix database write issues?
How to fix database connection issues?
Recommended hosting providers for Duplicator?
