Symptoms
-
Unable to export mysql database in Domains > example.com > Databases > Export Dump
Unable to export a dump of db:
Unable to backup database 'db'
(Error code 21) -
Client’s MySQL server is version 5.1
-
Migration fails with error:
Failed to copy content of database '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)PleskMySQLbinmysqldump -h localhost -P 3306 -uadmin -p*hidden* db --result-file=C:plesk_migratordb_backup_example.com_db.sql --routines --events
exit code: 2 -
Database dump created with following command is empty:
C:> “C:Program Files (x86)PleskMySQLbinmysqldump” -h localhost -P 3306 -uadmin -p”admin_password” db –result-file=C:plesk_migratordb_backup_example.com_db.sql
Cause
The issue is related to the bug PPP-49157: “Unable to export MySQL 5.1 database: Error code 21”.
Resolution
Until the bug is resolved the issue can be worked around with these steps:
-
Login to the server via RDP
-
Add default-character-set=latin1 to [client] section in
C:Program Files (x86)PleskMySQLmy.ini
[client]
port=8306
default-character-set=latin1 -
Restart Plesk SQL Server in Windows > Services > Plesk SQL Server > Restart