当前位置:网站首页>Centos+mysql message: can't connect to local MySQL server through socket '/var/lib/mysql/mysql socket

Centos+mysql message: can't connect to local MySQL server through socket '/var/lib/mysql/mysql socket

2022-06-09 22:50:00 Fight hard

1. see mysql The configuration file

locate my.cnf

2. see mysql.socket file location

3. And the destination address /var/lib/mysql/mysql.socket atypism , Soft link is required , Enter the first /var/lib Under the table of contents

cd /var/lib

4. establish mysql file

sudo mkdir mysql

5. Create soft link sudo ln -s mysql.sock Actual location /var/lib/mysql/mysql.socket

sudo ln -s /data_p/mysql_data/mysql.sock /var/lib/mysql/mysql.sock

原网站

版权声明
本文为[Fight hard]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/160/202206092159343211.html