SQL Help

Status
Not open for further replies.

tutudrag

New Member
Messages
1
Reaction score
0
Points
0
I get this error when i try to connect to sql db using mysql_connect. I have created a database name tutudrag_redeem

Access denied for user 'tutudrag_******'@'localhost' (using password: NO) in /home/tutudrag/public_html/test.php on line 8

any help will be appreciated. This is what i use to connect-> the code


$dbhost = "localhost:3306";

$dbname = "tutudrag_redeem";
$dbuser = "tutudrag_*****";
$$dbpass = "****";
mysql_connect($dbhost, $dbuser, $dbpass);
// Connect with database
 

Zubair

Community Leader
Community Support
Messages
8,766
Reaction score
305
Points
83
Change this $dbhost = "localhost:3306";

to

$dbhost = "localhost";
 

dlukin

New Member
Messages
427
Reaction score
25
Points
0
I get this error when i try to connect to sql db using mysql_connect. I have created a database name tutudrag_redeem

Access denied for user 'tutudrag_******'@'localhost' (using password: NO) in /home/tutudrag/public_html/test.php on line 8

any help will be appreciated. This is what i use to connect-> the code


$dbhost = "localhost:3306";

$dbname = "tutudrag_redeem";
$dbuser = "tutudrag_*****";
$$dbpass = "****";
mysql_connect($dbhost, $dbuser, $dbpass);
// Connect with database

Is that a typo in your post or does you code have one two many $

The error message is saying you are not using a password. Always read error messages.

Also, not sure if you need the port number on "localhost"
 
Last edited:
Status
Not open for further replies.
Top