开发者

MySQL access denied error but everything is correct!

Here's my code

<?php
$host = 'localhost';
$username = 'sam_sam';
$password = '[censored]';
$name = 'sam_ballpointradio';
mysql_connect($host, $db_username, $db_password)
or die(mysql_error());
mysql_select_db($db_name) or die(mysql_error());
?>

and the error message is

Warning: mysql_connect开发者_如何学Go() [function.mysql-connect]: Access denied for user 'sam'@'localhost' (using password: NO) in /home/sam/public_html/ballpointradio/db_config.php on line 6

Access denied for user 'sam'@'localhost' (using password: NO)

I know all the information is correct, but it's a weird error because it says I'm NOT using a password, but I am...


Variable naming problem ?

mysql_connect($host, $username, $password)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜