Can't connect to local MySQL server through socket &
程序员文章站
2022-06-15 14:45:38
...
執行 PHP 時出現類似這樣的錯誤訊息: Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) in /home/httpd/html/show.php on line 9 請將 /tmp/mysql.sock link 到 /var/lib/mysql 目錄裡即可
執行 PHP 時出現類似這樣的錯誤訊息:
Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) in /home/httpd/html/show.php on line 9
請將 /tmp/mysql.sock link 到 /var/lib/mysql 目錄裡即可:
linux# ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
上一篇: PHP 获取图片的宽和高
下一篇: 小白
推荐阅读
-
Linux登录MySQL时出现 Can't connect to local MySQL server through socket '/tmp/mysql.sock'解决方法
-
连接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 &