mysql链接错误

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.sock

mysql链接错误,布布扣,bubuko.com

mysql链接错误

上一篇:PostgreSQL hstore 列性能提升一例


下一篇:Navicat工具进行Oracle数据库复制 or 备份、还原功能(由评教需要所谈)