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

数据库323

```
[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

输入验证码查看隐藏内容

扫描二维码关注本站微信公众号 Johngo学长
或者在微信里搜索 Johngo学长
回复 svip 获取验证码
wechat Johngo学长