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

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

  1.原因一  进程

ps -A | grep -i mysql

kill 列出来的进程(关闭sql进程全部关闭)

 然后启动

service mysql start

完美解决!

2.原因二

原因是没有启动mysql服务

service mysql start

 
posted @ 2019-10-16 22:56  三只坚果  阅读(2845)  评论(0编辑  收藏  举报