1

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.

1
  • And is mysqld running?
    – Bobby
    Feb 18, 2010 at 20:33

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .