Monday, May 21, 2012

error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock'

Issue connecting to Mysql.

mysqld_safe mysqld from pid file /usr/local/mysql-5.5.15-osx10.6-x86_64/data/sanjay-ingoles-MacBook-Pro.local.pid ended

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


Resolution :

sudo /usr/local/mysql/bin/mysqld stop

Then
     shell> cd /usr/local/mysql
     shell> sudo ./bin/mysqld_safe

Then

/usr/local/mysql/bin/mysql -u username -p database

No comments:

Post a Comment