when i am trying to connect to mysql from my php page i got the below message
Warning: mysql_connect() : Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/d/e/a/dealersmax/html/db.php on line 6
Warning: mysql_select_db (): supplied argument is not a valid MySQL-Link resource in /home/content/d/e/a/dealersmax/html/db.php on line 7
I am using the below php code
can anyone please tell me how can i solve this?
Warning: mysql_connect() : Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/d/e/a/dealersmax/html/db.php on line 6
Warning: mysql_select_db (): supplied argument is not a valid MySQL-Link resource in /home/content/d/e/a/dealersmax/html/db.php on line 7
I am using the below php code
Code:
<?php
$conn1 = mysql_connect("localhost","username","password");
$db1=mysql_select_db("database",$conn1);
?>
Comment