linux mysql 命令行登录报错 不小心删除MySQL.sock
[root@cnsz92vl18571 bin]# ./mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)
find / -name mysql.sock
如果有查到结果 就建一个软链接到 /tmp
ln -s /data/mysql.sock /tmp/
贴出原博客地址:https://blog.csdn.net/hjf161105/article/details/78850658