0

Any idea why this is happening?

garrett@bedroom ~ $ mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
3
Contributors
4
Replies
18
Views
4 Years
Discussion Span
Last Post by lewashby
0

did you check whether mysqld.sock file exists in /var/run/mysqld ?

If not, you have to locate the correct directory (for example check /var/lib/mysql).
If found, you have to edit your my.cnf usually located in /etc/mysql

my.cnf has a section [client] like mine one:

    [client]
    port        = 3306
    socket      = /var/run/mysqld/mysqld.sock

Here you can update entry socket.

0

Did you already fixed your socket problem?

0

Hello,

The problem is that you do not ahve the mysql serve running which is called mysqld. You may not have it installed but and the client and server are two different packages.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.