解决 ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)


ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)

由于mysql 默认的mysql.sock 是在/var/lib/mysql/mysql.sock,但linux系统总是去/tmp/mysql.sock查找,所以会报错

网上找的方法    他的链接 http://blog.csdn.net/wyzxg/article/details/4720041



为mysql.sock增加软连接(相当于windows中的快捷方式)。

[root@feng mysql]#  ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock


ok了




你可能感兴趣的:(mysql,windows,linux,server,socket)