Entry
What's the best way to automatically check and repair MySQL tables?
Feb 8th, 2000 06:32
Nathan Wallace, Jason, Sasha Pachev
Make a script (eg: perl) to run myisamchk against each index file. If
corrupted, try a -q repair. If that doesn't fix the corruption, try a
normal repair, and if that doesn't work try an extended repair! We use
a system like this in our daily scripts and it works great.
For your information, this will be implemented in 3.23.10 inside mysqld,
so you will be able to say VERIFY TABLE my_table and it will check it,
and repair if necessary. You will also be able to force a repair with
REPAIR TABLE.