MySQL/MariaDB is down and is unable to be started.
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. That error seen would be the following depending on the table:
[Server] Table './mysql/table_name' is marked as crashed and should be repaired
Typically, you can repair user databases while MySQL/MariaDB is running using "Home » SQL Services » Repair a MySQL® Database" in WHM. In this situation, the MySQL service isn't running, and the table needs to be repaired manually.
- Confirm the table is corrupt by running the following:
myisamchk -s /var/lib/mysql/mysql/$table_namePlease 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/user
Please note that 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.