Go to the first, previous, next, last section, table of contents.


How to repair tables.

The file format that MySQL uses to store data has been extensively tested, but there are always instances (like a hard kill on the mysqld process in the middle of a write, a hardware error or a unexpected shutdown of the computer) when some tables may be corrupted.

The sign of a corrupted table is usually when queries abort unexpectedly and one gets errors like:

In these cases you have to repair your tables. The isamchk external utility can usually detect and fix most things that go wrong. See section The MySQL table check, optimise and repair program.

If you are going to use isamchk on very large files, you should first decide how much memory you want to give to isamchk. More memory gives more speed. For example, if you have more than 32M ram, try:

isamchk -O sortbuffer=16M -O keybuffer=16M -O readbuffer=1M
        -O writebuffer=1M ....


Go to the first, previous, next, last section, table of contents.