Saturday, June 3, 2017

Warning: mysql_connect(): No such file or directory in /Library/WebServer/Documents/





Warning: mysql_connect(): No such file or directory in /Library/WebServer/Documents/<YOUR_FILE_NAME.php>


You might need to change below files in you Mac OS.

If this file exist in your machine /tmp/mysql.sock but not /var/mysql/mysql.sock then do the perform below steps:

cd /var 
sudo mkdir mysql
sudo chmod 755 mysql
cd mysql
sudo ln -s /tmp/mysql.sock mysql.sock


But if  /var/mysql/mysql.sock exist in your machine but not  /tmp/mysql.sock this file, then do the below steps :...

cd /tmp
ln -s /var/mysql/mysql.sock mysql.sock



Good Luck !!!
Like, comment and share the knowledge....!!!

No comments:

Post a Comment

Fixing yum command on linux

You may find yourself having to fix more packages. So you can just remove everything you had installed via  pip and reinstall everythin...