出现这个错误原因是端口号不是3306. 打开D:\Program Files\MySQL\MySQL Server 5.5 \my.ini文件,当然还有其他的.ini的文件: [client] port=3306 [mysql] default-character-set=utf8 # SERVER SECTION# ----------------------------------------------------------------------## The following opt
Warning: mysqli_connect() [function.mysqli-connect]: [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in xxx.php on line 14 解决方案: cd /var sudo mkdir mysql sudo chmod 755 mysql cd mysql ln -s /tmp/mysql.sock mysql.