Remote access to MySQL not working

ealexnet

Registered
Oct 21, 2010
2
0
51
I have allowed remote access in WHM (added an IP of another host).
Still, trying to connect from that host I get this error:

MySQL connect failed. Access denied for user 'pctours_web'@'xx.xx.xx.xx' (using password: YES).

What can be the problem?
 

SS-Maddy

Well-Known Member
Mar 28, 2009
130
18
68
cPanel Access Level
Root Administrator
Hello @ealexnet ,

Access denied is for two reasons

1. The IP of another host from which you are connecting from is not allowed in the 'Remote MySQL' section of the cPanel of that user, pctours. See that IP
2. The password is incorrect.

When added from WHM, it should be global and you should see it from the cPanel's Remote MySQL option. May be you just added the IP in the "Additional MySQL Access Hosts" and then forgot to use the "Click here" in that same page to update that access host to all the users. Just adding and saving the IP in that section is not enough, you have to update.

Most probably, you may have missed the update part.
 

ealexnet

Registered
Oct 21, 2010
2
0
51
1. The IP of another host was allowed in the 'Remote MySQL' section of the cPanel of that user, pctours.
2. The password is correct.

Yes, it was added from WHM in "Additional MySQL Access Hosts" and then the "Update" option was selected

The error message shows that the connection is established OK, but access for this user is denied...
 

Jcats

Well-Known Member
PartnerNOC
May 25, 2011
807
160
168
New Jersey
cPanel Access Level
DataCenter Provider
Important: Users must log into cPanel and use the Remote MySQL feature to set up access from these hosts. After you have done this, if you would like to configure access from all users’ accounts click here.

Did you set it up from within the cPanel account: pctours
 

SS-Maddy

Well-Known Member
Mar 28, 2009
130
18
68
cPanel Access Level
Root Administrator
1. The IP of another host was allowed in the 'Remote MySQL' section of the cPanel of that user, pctours.
2. The password is correct.

Yes, it was added from WHM in "Additional MySQL Access Hosts" and then the "Update" option was selected

The error message shows that the connection is established OK, but access for this user is denied...
Did you get this solved ? I can think of only these two options. And since you are getting access denied, a mysql connect command from the host, should have thrown an error like "Host xx.xx.xx.xx is not allowed to connect to this MySQL server" if the remote IP is not added to the access hosts . Not sure whether it is always the same error for that though.

May be you could change the password to alpha numeric and see whether that work.

Would be interested in knowing how this got solved.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
Hello,


Is there anything of note in the server logs (cPanel error log and mysql error log) if you don't have access to these I would suggest contacting your provider for further assistance.