I install apache+php+mysql on RH 6.
I can access php (without MySQL) by web (like <? phpinfo() ?> ) . But it doesn't work with the php script that connect to mysql. It say :
"Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (111) in /usr/local/apache/htdocs/php/sql.php3 on line 10"
I have read old forum about this problem, when I run this script in command line, it work. (like "php sql.php3" ) but I can't access it from the web.
I have edit /etc/php.ini and /etc/my.cnf to set to the mysql.sock and create link from /tmp/mysql.sock to /var/lib/mysql/mysql.sock already, but I still have problem.
Is this a web server problem ?
I don't know what to do. Please help.
Thank for your kind : )
I can access php (without MySQL) by web (like <? phpinfo() ?> ) . But it doesn't work with the php script that connect to mysql. It say :
"Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (111) in /usr/local/apache/htdocs/php/sql.php3 on line 10"
I have read old forum about this problem, when I run this script in command line, it work. (like "php sql.php3" ) but I can't access it from the web.
I have edit /etc/php.ini and /etc/my.cnf to set to the mysql.sock and create link from /tmp/mysql.sock to /var/lib/mysql/mysql.sock already, but I still have problem.
Is this a web server problem ?
I don't know what to do. Please help.
Thank for your kind : )