i m new to php- mysql .
i have write simple code for making connection to the databse :
<?php
$link = mysql_connect('localhost', 'abc', 'abc123'); // (which is databse username and password)
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>
but its giving me following warning...
Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /misc/34/000/110/762/7/user/web/rollball.org/test.php on line 4
Could not connect: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
please help me...
Thanks a lot