Table corruption in MySQL is a very frequent issue, which primarily happens due to failed/forced transactions.
MySQL supports two different types of engines: MyISAM and InnoDB.
It is to be noted that the repair utility provided by MySQL can only be used for tables using MyISAM, while InnoDB crashed tables cannot be repaired using the repair tool.
The commands to repair MyISAM tables/databases in MySQL are as follows:
To check and repair all databases on the server:
mysqlcheck -A
Or to check and repair only one specific database:
mysqlcheck -r database_name
(where database_name is the name of the database to be checked/repaired)
Another thing to be noted here is that the -r option can fix everything except unique keys that aren't unique.
cPanel provides an option to repair tables from the interface itself.
This can be done via cPanel => MySQL Databases => Modify Databases => Check DB.
However, please note that this will work for MyISAM tables only. This option triggers the same commands mentioned above via backend.