I had a crash on a machine and rebooted and restarted mysql. Mysql loaded fine, I can connect with 'mysql -p' and do simple commands like "show tables;". However, real DB operations (e.g., "select [...]") just hang. Is there any idea on what is going on?

  • What is your server load? Is it slow? You can check top and uptime. – Khaled Jan 20 '11 at 16:02
  • low. mysql is running at about 11%. load average: 2.11, 2.08, 1.99 – muckabout Jan 20 '11 at 16:12
  • 1
    That's not that low... – Josh Jan 20 '11 at 21:00
  • Are any tables showing as locked? Do your DB ops use locking (e.g., in an app you might be testing)? – Paul Aug 8 '11 at 4:21


mysqlcheck -u root -pPASSWORD -A --check
mysqlcheck -u root -pPASSWORD -A --auto-repair
mysqlcheck -u root -pPASSWORD -A --optimize

MySQL runs check db operations when it boots up, and these make a lock on the dbs. Try this:

show processlist;

If a check process is currently running, you'll just have to wait it out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.