To solve this issue, you need to follow these steps in sequence:
First, you need to check MySQL table corruption. You can use CHECK TABLE statement , mysqlcheck command-line utility or myisamchk command-line utility. The latter two utilities can only be used with MyISAM tables and not with InnoDB tables. The basic syntax of these commands is as follows:
CHECK TABLE tablename
mysqlcheck dbname tablename
myisamchk dbname tablename
You can use appropriate options with them.
If you experience errors related to table corruption, you need to repair the affected table. To accomplish the same, you can use REPAIR TABLE command as below:
REPAIR TABLE tablename
You can also use mysqlcheck or myisamchk command-line utilities, but only for MyISAM tables.
If you continue to receive the same error messages, repair is beyond the scope of above utilities. Thus, you need to use an updated data backup to restore the complete database. But if no backup is available or the present backup is not valid to restore the lost data, you need to repair the damaged database with
https://www.repairtoolbox.com/mysqlrepair.html
Edited by: Peter Simpson on Aug 24, 2017 7:54 AM
Connect with Us