Symptoms
MySQL/MariaDB is down and is unable to be started.
Cause
Due to space issues or if a server is powered off/halted, a database table may be in a corrupted state. In a situation where the mysql database has a corrupt table, like mysql.user, MySQL will not start due to corruption. The error seen would be similar to the following, depending on the table:
CONFIG_TEXT: [Server] Table './mysql/table_name' is marked as crashed and should be repaired
Resolution
- Log in to WHM as
root - Navigate to Home / Database Services / Repair Databases
- Select a database to repair
- Click the Repair Database button
- Log in to the server via SSH as
root -
Confirm the table is corrupt by running the following:
# myisamchk -s /var/lib/mysql/mysql/$table_name
Note: "$table_name" must be replaced with the table name for the command to work.
-
If the table is corrupted, it can be repaired using the following command:
# myisamchk -r --update-state /var/lib/mysql/mysql/$table_name
Note: "$table_name" must be replaced with the table name for the command to work.
Note: cPanel, LLC only supports the cPanel-provided software and does not provide general system administration services. Therefore, you may wish to seek assistance from a qualified server/systems administrator to perform these tasks.
System Administrative Services
Comments
0 comments
Article is closed for comments.