Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to install mysql 5.1.42 and after running below line

sudo /usr/local/mysql/bin/mysqladmin -u root -p password

I get this error:

/usr/local/mysql/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

I have created mysqld.sock and gave permission to it too, but I still get the same error.

share|improve this question
    
And is mysqld running? –  Bobby Feb 18 '10 at 20:33

1 Answer 1

The MySQL server should create the /var/run/mysqld/mysqld.sock when it starts, you shouldn't need to create it yourself. The most likely problem is that the MySQL server isn't running. You can check this by running ps ax | grep mysqld this will show you the server process if there is one. If it isn't running then start it and give that command another go.

share|improve this answer

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.