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.
- Log into WHM as the 'root' user.
- Disable the "MySQL Server" service.
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- 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. - Use the
myisamchk
utility with the-r
option to repair the table.myisamchk -r /var/lib/mysql/$database_name/$table_name
- Log into WHM as the 'root' user.
- Enable the "MySQL Server" service.