mySql Access Denied Error

shaneiadt

New Member
Messages
2
Reaction score
0
Points
0
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'shaneiad_shaneia'@'74.86.116.190' (using password: YES) in /home/shaneiad/public_html/index.php on line 3
Could not connect: Access denied for user 'shaneiad_shaneia'@'74.86.116.190' (using password: YES)

This is the error for some reason i can't access the database i have already created and added a specific user to. Below is the php iam using to try connect but still doesn't work. Can someone please help?

<?php

$con = mysql_connect("http://shaneiadt.x10Hosting.com:2082","shaneiad_<db_username_here>","shaneiad_<db_user_pwd here>");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

mysql_select_db("shaneiad_test", $con);

//close connection
mysql_close($con);

?>

The DB test i have created with phpMyAdmin, but im not trying to execute any queries on it all iam doing is trying to connect to the thing first. Any help would be great thanks!

I have also tried the following connection string:

mysql_connect("http://shaneiadt.x10Hosting.com:2082","shaneiad_<db_username_here>","<cPanel_password_here>_<db_user_pwd here>");
 

deadimp

New Member
Messages
249
Reaction score
0
Points
0
Use "localhost" instead of your domain name. Corey has announced this on the News.
 

shaneiadt

New Member
Messages
2
Reaction score
0
Points
0
Yep i've changed that and still the same!!!!

Has anyone actually got this working because i don't see how my connection string contains any errors!!!

$con = mysql_connect('localhost','shaneiad_DBUSER','shaneiadt_DBPWD');

Still not working!!
 

deadimp

New Member
Messages
249
Reaction score
0
Points
0
First thing to try is re-type your statement from scratch. It isn't that much work, and maybe you will unkowingly fix a discrepancy.
Next thing is to read the recent news first. There might be some important information there.
As a last resort, try posting this under a support forum and close this thread. That way one of the staff can help you.
 

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
The database password doesn't start with your cpanel name - it's just the password.

So mine might look like this:

Code:
Mysql_connect('localhost','lw90210_fakedb','fakepass');

That should fix that particular one, which WOULD give an access denied since it had the wrong password.
 
Top