Applicable to:
- Plesk for Linux
Symptoms
-
Plesk full backup task fails with the following error:
PLESK_ERROR: Failed to execute backup of mysql database
-
Manual backup of domain's database results in error:
# plesk db dump db_name > database_backup.sql
mysqldump: Got error: 145: Table './db_name/table_name' is marked as crashed and should be repaired when using LOCK TABLES - Similar error show up during Plesk migration
Cause
Database table corruption.
Resolution
Repair the corrupted database using one of the following methods:
- Log into Plesk
- Go to Domains > example.com > Databases > db_name and click Check and Repair:
- Log into Plesk
- Go to Domains > example.com > Databases > db_name and click phpMyAdmin:
-
Click SQL button and run the following query:
CONFIG_TEXT: REPAIR TABLE table_name;
Note: Where
table_nameis the name of the table to repare
- Connect to the server via SSH
-
Execute the command:
# MYSQL_PWD=
cat /etc/psa/.psa.shadowmysqlcheck -uadmin -r db_name table_nameNote: Where db_name is the name of the database where table
table_nameto be repaired.
Note: if the solutions below don't help, the affected database should be restored from a backup.
Comments
Please sign in to leave a comment.