How to repair MySQL tables

Created:

2016-11-16 12:46:12 UTC

Modified:

2017-07-11 12:34:34 UTC

1

Was this article helpful?


Have more questions?

Submit a request

How to repair MySQL tables

Question

How to repair MySQL tables?

Answer

  1. Run 'mysqlcheck'  command to check and fix Plesk database table reported in error message:

    For Linux:

    mysqlcheck -uadmin -p`cat /etc/psa/.psa.shadow` -r <database name> <table name>

    For Windows:

    "%plesk_dir%MySQL\\bin\mysqlcheck" -P8306 -uadmin -p"plesk_admin_password" -r <database name> <table name>
  2. From MySQL console:

    mysql> REPAIR TABLE <table name>;
  3. Using SQL Webadmin: select table and choose Repair table action.

Note: not all the storage engines in mysql database support repairing (InnoDB, e.g.):

    The storage engine for the table doesn't support repair

In such a case, follow instructions provided in article \#213939865 .

Have more questions? Submit a request
Please sign in to leave a comment.