The first way is to use mysqlcheck
mysqlcheck -oCvf --auto-repair
The next way is it use myisamchk. Myisamchk is used only to repair myisam tables so you would need to be within the database directory to run this command on .MYI files.
cd /var/lib/mysql/
myisamchk -r -q *MYI
If you know what table needs to be repaired then you can use myisamchk and repair just that .MYI file or you can use mysql directly. This of course will be done while mysqld is running.
mysql -uroot -p
mysql> repair table ;
Please use these at your own discretion. We take no responsibility for data loss
No comments:
Post a Comment