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

mysql -uroot -p

解决:

建立软链接:

ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

即可。

 

参考:https://www.cnblogs.com/Lam7/p/6090975.html

posted @ 2017-11-25 15:11  园芳宝贝  阅读(6850)  评论(1编辑  收藏  举报