Home > Database > Mysql Tutorial > Can't connect to local MySQL server through socket &

Can't connect to local MySQL server through socket &

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:15:42
Original
1074 people have browsed it

執行 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

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Can php locate the client?
From 1970-01-01 08:00:00
0
0
0
Can php toolbox view error logs?
From 1970-01-01 08:00:00
0
0
0
Can materials be provided?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template