Can't connect to local MySQL server through sock_MySQL
程序员文章站
2022-06-01 13:50:53
...
Error信息
ERROR - 2014-06-07 11:53:33 --> 2002 - SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) in /var/www/html/blog/fuel/core/classes/database/pdo/connection.php on line 100
本人服务器的现象是:
mysql可以正常启动,命令执行也没有任何问题但是还是会出现上面的错误
原因:
经过调查,是因为/var/lib/mysql/mysql.sock 这个文件的权限有问题解决办法:
chmod 777 /var/lib/mysql/mysql.sock
上一篇: 基于vue自制简单range的代码
推荐阅读
-
连接Mysql提示Can’t connect to local MySQL server through socket的解决方法
-
MySQL错误 ERROR 2002 (HY000): Can't connect to local MySQL server through socket 的解决办法
-
Can't connect to local MySQL server through socket
-
linux安装MySQL后输入mysql显示 ERROR 2002 (HY000): Can't connect to local MySQL server through socket
-
ERROR 2002 (HY000): Can't connect to local MySQL server thro
-
【解决】Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.soc
-
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var mys
-
ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var mys
-
Can't connect to local MySQL server through socket &
-
error: 'Can't connect to local MySQL_MySQL