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.







One response to “MySQL Table “In Use” Repair”

  1. Nagdy Avatar

    A great solution in my case I used /var/lib/mysql/YOUR_DATABASE_NAME/ removal “/etc”

    Thank you

Leave a Reply

Your email address will not be published. Required fields are marked *