Failed to connect to MySQL

Status
Not open for further replies.

jrasmus1

New Member
Messages
16
Reaction score
0
Points
1
I've seen a few forums on this topic but none that resolved my problem. Basically, I'm trying to access my sql server database from a php page. I tried:

<<
$con=mysqli_connect("xo4.x10hosting.com","yourlif3_rachel","[removed by moderator]","yourlif3_members");
>>

But I'm getting "Access denied for user 'yourlif3_rachel'@'xo4.x10hosting.com' (using password: YES)"

My server name: xo4.
The database user: yourlif3_rachel
Password: [removed by moderator]
Database name: yourlif3_members

I created the database "yourlif3_members" and added the user "yourlif3_rachel" with the password "[removed by moderator]" with x10hosting.

I've never had a problem accessing my sql server from other web hosting services. So I suspect I'm missing something small -- like perhaps the sql server host name?

Any ideas?
 
Last edited by a moderator:

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi,

Please try using the hostname "localhost" instead (rather than xo4.x10hosting.com). :)

Additionally, please be aware that this is a public forum. I would recommend changing your database password. ;)

Thank you,
 

jrasmus1

New Member
Messages
16
Reaction score
0
Points
1
You solved it (so quickly)! Thank you! (And yes, changing password now is a good idea.)

Unless you think it is too obvious to others, it might be worth adding a little info window in the database control panel which includes the 4 pieces of info (db name, user name, host name, password).

Thanks again!
 
Status
Not open for further replies.
Top