When i'm trying to start MySQL server the following error occur:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Any ideas what this error means and how I can fix it?
|
When i'm trying to start MySQL server the following error occur:
Any ideas what this error means and how I can fix it? |
|||||
|
|
This article may be of use. Below is an a part of the article with the most important bit. (Read the whole article for the solution) For the mysql client, the default location of this socket file is /tmp/mysql.sock. However, for a variety of reasons, many MySQL installations place this socket file somewhere else like /var/lib/mysql/mysql.sock.
|
|||
|
|
|
OK, so the most likely explanation for this error is that you've not got the MySQL server running. Since you're running on a Mac, try this to start MySQL:
After that last command, you might need to press your ENTER key one extra time to get the command prompt back to showing what you'd normally expect, but the MySQL server should now be started - look at the output and it'll hopefully say something like:
Now, try logging in to mysql:
Hopefully, you're now cooking with gas. |
|||
|
|