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.

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

1 Answer

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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