Dears Friends, I would like know as do for configure my PHP to access the MYSQL. The warning is:
Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)
Thanks
Try setting up your mysql server to use unix sockets, or specify the hostname in your call to mysql_connect
My problem persist. My document is :
<? $usr = ""; $pass = ""; $datn = "test"; $ip = "localhost";
$conn = mysql_connect($ip,$usr,$pass); $database = mysql_select_db($datn,$conn); ?>
have you tried a: locate mysql.sock at the commandline of your server? perhaps mysql.sock isn't in /tmp, it isn't on my server (it is in /var/lib/mysql on mine)
D
Dear friend, sorry, but where can I configure this option??
I coincidentally ran across the same problem today. All you need to do is edit your "my.cnf" file to put the socket in /tmp/mysql.sock instead of the default location.
If you dont have a "my.cnf" file in your /etc directory, there should be some default files in the /usr/sbin dir.... Hope this helps.
Errr... dumb question... do you have mysql database installed on your machine? If so, is it actually running?