Symptoms
-
Backup is finished with warnings. The following appears in Plesk Backup Manager:
Unable to make database dump. Error: Failed to exec mysqldump.exe: Exit code: 2: mysqldump.exe: Couldn't execute 'select column_name, extra, generation_expression, data_type from information_schema.columns where table_schema=database() and table_name='category'': Unknown column 'generation_expression' in 'field list' (1054)
- Plesk Migrator website transfer from a source server that uses MySQL 5.6 or lower fails with an error that is similar to the following:
Failed to copy content of database 'example_db'
Migration tools tried to perform operation in 3 attempts: Command execution failed on the source server 'source' (203.0.113.2) with non-zero exit code.
command: "C:Program Files (x86)ParallelsPleskMySQLbinmysqldump" -h localhost -P 3306 -uadmin -p***hidden*** --default-character-set=utf8mb4 --set-charset example_db --result-file=C:plesk_migratordb_backup_example.com_example_db.sql --routines --events
exit code: 2
stdout:
stderr: mysqldump: Couldn't execute 'select column_name, extra, generation_expression, data_type from information_schema.columns where table_schema=database() and table_name='corn_update'': Unknown column 'generation_expression' in 'field list' (1054)
Cause
Unsupported MySQL version (5.6 or lower) is used on the server, and generation_expression
column from the warning message is supported from MySQL 5.7.
Resolution
- Migrate the domain to which the affected database belongs to a different server with MySQL 5.7 or the latest MariaDB version installed.
As workaround:
Install MariaDB 10.11 or later on the affected server
-
Create a full server snapshot of the server before proceeding to ensure that there is a restore point in case anything goes wrong. Contact System Administrator for details.
-
Go to Plesk > Tools & Settings > Updates > Add/Remove Components > MySQL Server menu
-
Select the MariaDB 10.11 server and press Continue.
Warning: this operation will change the DB engine from MySQL 5.6 to the latest MariaDB 10.11 and will cause downtime of your server. We suggest performing it during maintenance hours.
Note: In case that the MySQL server (MariaDB) fails to start and cannot be repaired, restore the server to a snapshot created in step 1.
For reference: How to switch database server from MySQL to MariaDB on Plesk for Windows