How to Repair MyISAM Tables
MyISAM tables (.MYI and .MYD) can be repaired using myisamchk command.
To find list of corrupted tables
1 |
myisamchk /var/lib/mysql/DB_NAME/*.MYI >> /root/1.txt |
To rapier a table
1 2 |
cd /var/lib/mysql/DB_NAME/ myisamchk -r TABLE_NAME_HERE.MYI |
To check and repair all tables
1 |
myisamchk --silent --force --fast --update-state /var/lib/mysql/DB_NAME/*.MYI |
Look like newer version of MySQL, you need to specify just table name, no extension, for example
1 2 |
cd /var/lib/mysql/DB_NAME/ myisamchk -r TABLE_NAME |
Back to MySQL Repair