Articles in this section

Full backup or migration fails in Plesk: mysqldump: Got error: 145

Plesk for Linux kb: technical ext: migrator ABT: Group A

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:

Via Plesk GUI
  1. Log into Plesk
  2. Go to Domains > example.com > Databases > db_name and click Check and Repair:
    db-rep.PNG
Via PHPMyAdmin
  1. Log into Plesk
  2. Go to Domains > example.com > Databases > db_name and click phpMyAdmin:
    db-rep.PNG
  3. Click SQL button and run the following query:

    CONFIG_TEXT: REPAIR TABLE table_name;

    Note: Where table_name is the name of the table to repare

Tab via CLI
  1. Connect to the server via SSH
  2. Execute the command:

    # MYSQL_PWD=cat /etc/psa/.psa.shadow  mysqlcheck -uadmin -r db_name table_name

    Note: Where db_name is the name of the database where table table_name to be repaired.

Note: if the solutions below don't help, the affected database should be restored from a backup.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.