Jump to content

Warning: mysql_connect(): Access denied


justedee

Recommended Posts

Warning: mysql_connect(): Access denied for user 'review'@ (I delete this part ).net' (using password: YES) in /home/content/d/a/z/dazedangels/html/review/conn.php on line 4

Access denied for user 'review'@(I delete this part ).net' (using password: YES)

 

These are lines 1 – 4

1  <?

2

3  //connect to the database server

4  $connection = mysql_connect($db_host, $db_username, $db_password) or die(mysql_error());

 

I’m very new at this (and 6 ½ month pregnant – mind gone!)

I keep searching the web and googling the error, but I’m not sure what I’m looking for.

Any ideas?

~eDee

 

Link to comment
https://forums.phpfreaks.com/topic/45004-warning-mysql_connect-access-denied/
Share on other sites

um, $db_host, $db_username, and $db_password are not defined in your script anywhere (unless that's the mysterious blank line 2).  I'd also highly recommend using <?php not <? in case you ever run into a server where 'short tags' are not enabled.

Problem is probably connected to your variables ($db_host, $db_username, $db_password), maybe you have a mistype somewhere? Do an echo on those three variables to see if they are showing the correct values, should give you some relevant information I think.

 

Also, as previous poster said, it is a good idea to use <?php instead of <?.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.