MySQL Table “In Use” Repair

Recently when i optimized some mysql tables from phpmyadmin, some of the tables were “locked” and showed as “in use” on phpmyadmin. The tables could not be used, read, etc. So the script was stopped working.
I have tried to repair / check / analyze from phpmyadmin but i couldn’t repair it.
So i tried to repair the mysql tables from SSH.

Go to your database directory. Usually it is located on

So use this command first
cd /etc/var/lib/mysql/YOUR_DATABASE_NAME/

Next, use this command
myisamchk --safe-recover --force YOUR_TABLE_NAME

And the MySQL table should be repaired now.

1 comment

Leave a comment

Your email address will not be published.