MySQL Connection Falied: mysql.sock

wxdqz

New Member
I'm just got MySQL running on redhat 7 but now I want to use it together with php.
I'm just install the packages of the RedHat 7 complete (all the apache*'s; all the php*'s; and all the mysql*'s). Everyone run perfectly, php4 within apache-1.3.*, and MySQL-3.23.*. Just created a db (db_control) and created many tables.
But when i try run the code
if (!($id = mysql_connect("localhost","phpuser","phppasswd"))){
echo "Error in conection.";
exit;
}
This message appear:
Warning: MySQL Connection Falied: Can't connect to local MySQL server through
socket '/var/lib/mysql/mysql.sock' (111) in /var/www/html/index.php on line 6.

Please Help me, I'm crazing...
Thanks.
 
Back
Top