MYSQL server for PHP login

Status
Not open for further replies.

wtvelocity

New Member
Messages
9
Reaction score
0
Points
0
Hi im new to PHP, so maybe I'm doing something wrong.

I have a login script I copied, and am trying to put it on my site. Upon registration I get the error:
Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'mysql.x10hosting.com' (1) in /home/darwin/public_html/database.php on line 6
Unknown MySQL server host 'mysql.x10hosting.com' (1)

What I THINK is happening is that I have the wrong MySQL host (I'm using exofire.net).
here is my code for database.php:

<?

/**
* Connect to the mysql database.
*/
$conn = mysql_connect("mysql.x10hosting.com", "*********", "*******") or die(mysql_error());
mysql_select_db('members', $conn) or die(mysql_error());

?>

The Site I'm using it on is conquestofages.exofire.net.

If anyone need more info, the source I copied from is Here:
http://www.evolt.org/article/comment/17/60265/index.html

Thanks :)
~WTV~
 
Last edited by a moderator:

bugfinder

Retired
Messages
2,260
Reaction score
0
Points
0
the mysql server is "localhost"
the mysql username if you told it to make one called test doesnt end up as test, it ends up as account_test
 

wtvelocity

New Member
Messages
9
Reaction score
0
Points
0
Thanks that solved that problem. Sorry to bother you again, but now I'm getting this...

Warning: mysql_connect() [function.mysql-connect]: Access denied for user '(acount)_(username)'@'localhost' (using password: YES) in /home/(account name)/public_html/database.php on line 6
Access denied for user '(account)_(username)'@'localhost' (using password: YES)

Ummmm what? Thanks for any more help :)



Edit:
Can someone please help? I appreciate the swift response last time, and I know that it might not always happen. But please, I've been trying to make a login script for a while now, and it's frustrating thinking I got it working, only to get an error *i dont even understand*...

Someone, any ideas plz? What does "password=YES" mean? thats prob whats messing up the script...

Thanks :)
 
Last edited:

Christopher

Retired
Messages
14,659
Reaction score
8
Points
0
"password=YES" means that it is using a password.
Did you give the user permission on the database?
 
Status
Not open for further replies.
Top