标签:
默认找到的是/tmp/mysql.sock文件
需要做个软链接
find / -name ‘mysql.sock‘
只在/var/lib/mysql 下有mysql.sock文件
ln -sv /var/lib/mysql/mysql.sock /tmp/mysql.sock
链接到/tmp/mysql.sock
vim /etc/profile.d/mysql.sh
export PATH=/usr/local/mysql/bin:$PATH
. !$ # 执行上一个编辑的脚本
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
标签:
原文地址:http://www.cnblogs.com/xxdfly/p/5750407.html