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

For some reason my MySQL can't connect any more. I'm running three WordPress sites and I need to save the tables. That's what I really really really really care about.

Here is the problem:

root@dev:/var/log/mysql# mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

The same error is displayed when logging in with phpMyAdmin..

All of the websites display this error:

Error establishing a database connection

share|improve this question

migrated from stackoverflow.com Sep 1 '12 at 0:47

This question came from our site for professional and enthusiast programmers.

    
Where is this hosted? –  njk Aug 31 '12 at 23:34
1  
Have you tried restarting MySQL? You might have just run out of sockets because of a DDOS attack. –  Paul Tomblin Aug 31 '12 at 23:34
    
At linode in NJ –  user1048138 Aug 31 '12 at 23:34
    
mysql server is down... database files should not be deleted, if they are deleted or corrupted check binlogs, you can recover db from binlogs if enabled –  Hawili Aug 31 '12 at 23:34
2  
Shut down your web server, and try restarting MySQL server. Probably everything is fine. If not, aren't you glad you take daily backups? –  Paul Tomblin Aug 31 '12 at 23:35

1 Answer 1

mysql is not running - why don't you try starting it

And of course none of this should be a real issue because you have regular backups right?

share|improve this answer
    
What if he isn't an admin? –  njk Aug 31 '12 at 23:36
    
I think the answer to that is obvious –  Adrian Cornish Aug 31 '12 at 23:37
    
linode's business grants ssh access to customers. If the original questioner isn't an admin, he surely has a colleague who is. –  Ollie Jones Aug 31 '12 at 23:39

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.