myISAM tables automatic recovery

Speaking today with Carl, he mentioned that myISAM tables are very fast, but can be corrupted if power is lost. He also said that there is an modification to my.ini to enable automatic recovery on restart. Can someone elaborate on that modification.


There is a modification that you can do to have MySQL automatically recover MyISAM tables after a crash. First, open up the my.ini file located at C:\Program Files\MySQL\MySQL Server 5.0\my.ini (typically).

Add the following at the end of the [mysqld] block, before the next []:


Save the file and restart MySQL. To restart MySQL go to Start - > Control Panel - > Administrative Tools - > Services. Find MySQL and then right click and select Restart.

Hope this helps.

One thing to also note - if you’ve installed MySQL through a recent version of our unified installer with our sample project, this will already be in your .ini file.


Another advantage of myisam is the myisampack utility. It will compress archived data tables 40-70% according to MySQL (it also makes it read only). One interesting side effect is that it does compression by column, so it is VERY EFFICIENT for SELECT queries that are reading large amounts of data from certain columns.