首页 > 数据库技术 > 详细

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

时间:2019-02-26 12:12:33      阅读:205      评论:0      收藏:0      [点我收藏+]
[root@localhost etc]# ps -A|grep mysql
 26080 pts/0    00:00:00 mysql

[root@localhost etc]# kill -9 26080

[root@localhost etc]# ps -A|grep mysql

[root@localhost etc]# mysql restart
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory")

[root@localhost etc]# /etc/init.d/mysql restart
Restarting mysql (via systemctl):                          [  OK  ]

[root@localhost etc]# mysql -uroot -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 10.1.38-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> 

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

原文:https://www.cnblogs.com/apollo1616/p/10436106.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!