When I try OPTIMIZE TABLE `table`
(MyISAM) on a table which is about 300MB, then it is crashed and must be repaired. What could cause this problem? The same problem occurs on other tables over 300MB.
Tell me more
×
Database Administrators Stack Exchange is a question and answer site for
database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.
migrated from stackoverflow.com Mar 31 at 18:27
MYISAM tables are very fragile and get damaged/crash every now and then. First advice is to move to Innodb engine it is simply performed by using alter table command. Now, to fix crashed MYISAM tables the proper way is to bring the MYSQL down and once it is down and there is no traffic you can fix them using this command line statement:
Trying to repair/optimise MYISAM tables on a live server usually does not work. From MYSQL CLI the command should be
instead of |
|||
|
OPTIMIZE
? – nneonneo Mar 31 at 9:02my.cnf
without comments (on Linux it would be/etc/my.cnf
). – mvp Mar 31 at 9:02