netstat -ln | grep mysql
查看mysql.sock
实际路径:
[root@localhost backup]# netstat -ln | grep mysql
unix 2 [ ACC ] STREAM LISTENING 62019 /tmp/mysql.sock
- 创建软链
ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
netstat -ln | grep mysql
查看mysql.sock
实际路径:[root@localhost backup]# netstat -ln | grep mysql
unix 2 [ ACC ] STREAM LISTENING 62019 /tmp/mysql.sock
ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock