Possible Duplicate:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in select
I tried to connect mysql database.but am getting the following error.
Warning:
mysql_connect(): [2002] No connection could be made because the target machine actively (trying to connect viatcp://localhost:3306) intest.phpon line 5Warning:
mysql_connect():No connection could be made because the target machine actively refused it. in test.php on line 5 Warning:mysql_close()expects parameter 1 to be resource, boolean given intest.phpon line 15
test.php:
<?php
$link = mysql_connect(localhost, dbuser, dbpass);
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>