Articles in this section

On Plesk the MariaDB service goes down intermittently: './database_name/table_name' is marked as crashed and should be repaired

kb: auxiliary

Symptoms

  • MariaDB service goes down intermittently with errors such as:

    # journalctl -u mariadb
    localhost mariadbd[1940]:[ERROR] mariadbd: Table './database_name/table_name' is marked as crashed and should be repaired

Cause

The database files from the error have corrupted tables.

Resolution

  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:

      # mysqlcheck -r database_name table_name -uadmin -p`cat /etc/psa/.psa.shadow`

  • 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:

      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 database support repair of the tables. If storage engine does not support repair the following message will appear:

    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

0 comments

Please sign in to leave a comment.