Newbie

rimmy

New Member
Messages
9
Reaction score
0
Points
0
Hey all, I'm new to x10 hosting so naturally I have a question.:nuts:

Anyways, you're probably going to laugh at me, but essentially my problem is that I'm having trouble with MySQL. I have created a database and a user, and then I put on a simple script that connected my site to the database.

<?php
mysql_connect("
*****", "*****", "*****") or die(mysql_error());
echo "Connected to MySQL<br />";
mysql_select_db("test") or die(mysql_error());
echo "Connected to Database";
?>

Something must be wrong because I keep getting an error.

[21-Feb-2008 19:29:48] PHP Warning: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Access denied for user '*****'@'74.86.116.190' (using password: YES) in /home/rimmy/public_html/index.php on line 9


Btw, I have checked, and the password, username, and database name are all correct. (For security reasons, I have replaced all usernames, passwords, and database names with *****.)

What am I doing wrong?
 

KentonBomb

New Member
Messages
42
Reaction score
0
Points
0
I don't know how to help, as it says the error is on line 9, and that code is 6 lines long. Is this the whole script?
 

rimmy

New Member
Messages
9
Reaction score
0
Points
0
No that's not the whole page. The rest of the page is just the html stuff.

By line 9, it means the line where it says:

mysql_connect("*****", "*****", "*****") or die(mysql_error());

But as I said in the post above, I just replaced the real name of the db, username, and pass with *****. I also happen to know for a fact that the db, user, and pass are correct.

EDIT:
***Nevermind. I found out the error. Sorry for bothering anyone.***
 
Last edited:

Synkc

Active Member
Messages
1,765
Reaction score
0
Points
36
Is your database name and account name in the format: rimmy_*database/user*?
 

rimmy

New Member
Messages
9
Reaction score
0
Points
0
Yes, it was. I found out, that I had just misspelled something.:biggrin:
 
Top