Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
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
add comment

2 Answers

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
add comment

Try:

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

Your Answer

 
discard

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.