A have already read everything about this error but I coundn't solve the problem.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (38)
I'm trying to install mysql on my Mac OsX but when I try to connect to the db (mysql -u root -p
) I see this problem, ERROR 2002
.
I have Mysql installed in /usr/local/mysql
Best Answer
Check the MySQL daemon is running
You can check if the
mysqld
daemon from **Terminal Application* running:And verifying that you get something similar to this:
or looking for a
mysqld
process on the Activity Monitor applicationIf it's not running you have to start the daemon.
Start MySQL daemon
On Mac OSX you can start the daemon from the Terminal Application with something like this:
Again check that now the MySQL daemon is running as described before.