June 22, 2015

MySQL Table says IN USE, but table will not repair in phpmyadmin.



From time to time mysql corrupts itself.  This can normally be fixed using the KB Article here: http://billing.handsonwebhosting.com/knowledgebase.php?action=displayarticle&id=194
Under some situations however, no matter how many times you run a REPAIR on the table, the table still returns IN USE and what's worse is that the system says the table is "already up to date".
If you have shell access, here's what to do;

cd /var/lib/mysql/DATABASE  (where DATABASE is the one you're trying to fix)

myisamchk --safe-recover TABLE  (where TABLE is the table you are tring to fix)

This will will repair the table in safemode, and SHOULD result in success.

0 comments:

Post a Comment