Enable MyISAM Auto-Repair
MyISAM can be configured to check and repair its tables automatically. By enabling the MyISAM auto repair you let the server check each MyISAM table when it is opened. It checks if the table was closed properly when it was last used, also checks if it needs any repair, if required it repairs the table.
To enable auto check and repair,you can start the server with –myisam-recover with following options.
DEFAULT for the default checking.
BACKUP tells the server to make a backup of any table that it must change.
FORCE causes table recovery to be performed even if it would cause the loss of more than one row of data.
QUICK performs quick recovery: Tables that have no holes resulting from deletes or updates are skipped.
You can also add it to the my.cnf file as shown below
[mysqld]
myisam-recover=FORCE,BACKUP
-Thanks

Oct 08, 2010 @ 17:10:05
Hi,
Be advised that repair process is not guaranteed to succeed.
Also, a REPAIR may leave your tables in correct format, but with corrupted data.
Finally, the time it takes to repair is linear at the size of the table.
Oct 11, 2010 @ 09:19:17
You should make sure that there is enough space available on the filesystem to rebuild the biggest MyISAM table if you want this to have the possibility to succeed. So if your biggest table is 50G that you’ll need more than 50G free space.
Jun 24, 2011 @ 11:39:50
Is there any difference between the performance of web application which uses database with –myisam-recover, and the same application which uses database without it?
lets assume, that tables in both applications are OK, not corrupted.
I would like to know if I enable this, it will slow down my mysql requests