时间:2021-07-01 10:21:17 帮助过:17人阅读
原因:找不到mysql.sock文件
解决方法:
1 找到mysql.sock文件位置
echo "show variables" | mysql | grep "socket"或者echo "status" | mysql | grep "socket"
2 ln -s /var/lib/mysql /mysql .sock /tmp/mysql .sock
将两个文件做一个软连接
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock'
标签:nbsp sock 找不到 variable stat 连接 variables grep ror