/var/lib/mysql/mysql.sock connection failed

  
 

I have encountered such a problem today. Mysql is installed by default. /var/lib/mysql/mysql.sock But the development side can connect through databaseCB but can be replaced by /tmp/mysql.sock

In addition PHP
connection can not pass /var/lib/mysql/mysql.sock can only /tmp/mysql.sock just the opposite

mysql.php content

< ?php $link=mysql_connect('127.0.0.1 or native ip', 'root', '008'); if(!$link) echo "Failure!"; else echo "success!"; Mysql_close(); ?>

Remember to assign weight to this ip, and to release port 3306

Copyright © Windows knowledge All Rights Reserved