hi!
hav a problem w/ connecting to a MySQL db.
the error msg is:
1044: Access denied for user: '@' to database 'dc_surveyDB'
my code snippet is:
<?
$GLOBALS["maindsn"] = "dc_surveyDB";
$GLOBALS["username"] = "dc_user@localhost";
$GLOBALS["password"] = "";
//establish connection
$GLOBALS["dbLink"] = @mysql_connect("localhost", $GLOBALS["username"], $GLOBALS["password"]);
$s = mysql_select_db($GLOBALS["maindsn"], $GLOBALS["dbLink"]);
echo mysql_errno().": ".mysql_error()."<BR>";
if ($s) print('OK...');
else pint('ERROR..');
?>
any idea why there's an error? any help would be greatly appreciated...
🙂