浏览文章
文章信息
Mysql报错:error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
14608
1、检查报错情况
systemctl status mysqld.service
2、如果是
Directory '/var/run/mysqld' for UNIX socket file don't exists.
创建'/var/run/mysqld
mkdir -p /var/run/mysqld service mysqld start ls /var/run/mysqld # 发现有mysqld.sock文件 ln -s /var/run/mysqld.sock /tmp/mysql.sock