Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Remote access to MySQL not working

Discussion in 'Database Discussion' started by ealexnet, Jul 1, 2018.

  1. ealexnet

    ealexnet Registered

    Joined:
    Oct 21, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    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?
     
  2. SS-Maddy

    SS-Maddy Well-Known Member

    Joined:
    Mar 28, 2009
    Messages:
    105
    Likes Received:
    6
    Trophy Points:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. ealexnet

    ealexnet Registered

    Joined:
    Oct 21, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    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...
     
  4. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    720
    Likes Received:
    123
    Trophy Points:
    168
    Location:
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. SS-Maddy

    SS-Maddy Well-Known Member

    Joined:
    Mar 28, 2009
    Messages:
    105
    Likes Received:
    6
    Trophy Points:
    68
    cPanel Access Level:
    Root Administrator
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,721
    Likes Received:
    186
    Trophy Points:
    143
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice