Articles in this section

How to repair website MySQL/MariaDB databases and tables in Plesk?

Plesk for Windows kb: how-to Plesk for Linux ABT: Group A

Applicable to:

  • Plesk for Windows
  • Plesk for Linux

Question

  • How to repair non-InnoDB MySQL/MariaDB tables on Plesk server?

  • How to repair domain MySQL/MariaDB databases and tables in Plesk?

Answer

  1. Log into Plesk

  2. Go to Domains > example.com > Databases and click Check and Repair for the required database

Command-line solution

Linux-based operating systems:

  1. Connect to server over SSH

  2. Execute the below command substituting required table and database:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqlcheck <database name> <table name> --repair -u admin

Windows-based operating systems

  1. Connect to server via RDP

  2. Open command-line console cmd.exe with Administrator privileges.

  3. Execute below command substituting required table and database:

    MYSQL_WIN: C:>"%plesk_dir%MySQL\bin\mysqlcheck" -P3306 -uadmin -p -r <database name> <table name>

    If the password is unknown, reset it according to this KB article.

Not all the storage engines in MySQL//MariaDB database support repair of the tables. If storage engine does not support repair the following message will appear:

CONFIG_TEXT: The storage engine for the table doesn't support repair

In such a case, follow the instructions provided in the article: How to fix InnoDB corruption cases for the MySQL database?

Additional Information

How to access MySQL databases?

Was this article helpful?

Comments

1 comment
Date Votes
  • Hi Benjamin Weßel,

     

    May I ask how would you do so for all tables, or, how would you know which table to fix, and how to set it in the recommended CLI?

     

    1

Please sign in to leave a comment.