Introduction

An error similar to the following will be encountered when running a backup.

Cpanel::Exception::ProcessFailed::Error/(XID redctd) “/usr/bin/mysqldump”
reported error code “3” when it ended: mysqldump: Error 1194: Table
'db_options' is marked as crashed and should be repaired when dumping
table `db_options` at row: 150

An error similar to the following may also be found in the MySQL error log.

[ERROR] /usr/sbin/mysqld: Table './db_name/table_name' is marked as
crashed and should be repaired

Sometimes, a MySQL database will be marked as crashed and require repair. The myisamchk utility can be used to repair MyISAM tables.

 

Procedure

Please note, the database should be backed up before the repair procedure begins.

  1. Log into WHM as the 'root' user.
  2. Disable the "MySQL Server" service.
  3. Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
  4. Use the myisamchk utility to check the database table for errors.
    myisamchk /var/lib/mysql/$database_name/$table_name
    Please note, "$database_name" and "$table_name" must be replaced with the database name and table name, respectively.
  5. Use the myisamchk utility with the -r option to repair the table.
    myisamchk -r /var/lib/mysql/$database_name/$table_name
  6. Log into WHM as the 'root' user.
  7. Enable the "MySQL Server" service.

 

Additional resources

MySQL backups with mysqldump

How to enable/disable a service in WHM.

13.7.2.5 REPAIR TABLE Statement