Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 have got problem with my mysql. It started with that I was importing a dump with the workbench tool. I waited about 30 mins for it to finish but nothing happened so i decided to press stop, to my surprise that did no work either so i close the application and opened it again. Under the tab server status i could see that it was still working on it i decided then to wait a while longer to see what would happen. The sql script seemed to finish but after that mysql was unusable. I can no longer start mysql if i do it with the workbench tool i get the error

Start server

A permission error occurred while attempting to start the server. Administrator password was possibly wrong.

If i try to access mysql by CL

mysql -u root -p -h localhost -P 3306

I get errors like this.

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

How can i fix this so i can use my mysql databases again?

share|improve this question
Maybe if you delete the /var/run/mysqld/mysqld.sock, restart your mysqld service and finally try to access to mysql client.:) – slackmart Jul 14 '13 at 3:30
up vote 1 down vote accepted

Ok, here is:

  • Delete mysqld.sock
    rm /var/run/mysqld/mysqld.sock
  • Restart the mysqld service
    service mysqld stop
    service mysqld start
  • Try to access to mysql client
    mysql -u root -h localhost -p


If you really need connect to that port, then do it, avoid that otherwise.
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.