Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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
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

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.

share|improve this answer


mysqlcheck -u root -pPASSWORD -A --check
mysqlcheck -u root -pPASSWORD -A --auto-repair
mysqlcheck -u root -pPASSWORD -A --optimize
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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