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 MySQL Connection Issue

Discussion in 'Database Discussion' started by GodLumeN, Feb 7, 2019.

  1. GodLumeN

    GodLumeN Registered

    Joined:
    Feb 6, 2019
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    France
    cPanel Access Level:
    Root Administrator
    Hello,
    I have somes troubles with the remote SQL link between my Cpanel and a remote script. So I have two servers a VPS is CPanel under centos 6 and the dedicated where is my script under debian 9 of the coup I "whitelist" the ip of the dedicated on WHM and CPanel but unfortunately the connection is not done in the SQL logs I see connection dead.
    And I have verified that the password and the identifier and that the database name is correct.
     
  2. Eminds

    Eminds Well-Known Member

    Joined:
    Nov 10, 2016
    Messages:
    312
    Likes Received:
    28
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. GOT

    GOT Get Proactive! PartnerNOC

    Joined:
    Apr 8, 2003
    Messages:
    1,464
    Likes Received:
    180
    Trophy Points:
    193
    Location:
    Chesapeake, VA
    cPanel Access Level:
    DataCenter Provider
    You also need to add the IP of the debian server to the remote Mysql Hosts either in the account cpanel where the database is, or in WHM to cover the entire server.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,161
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @GodLumeN


    The suggested provided in here are both great, if you could please go through the steps listed in the documentation provided and let us know if you're still experiencing issues.

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. GodLumeN

    GodLumeN Registered

    Joined:
    Feb 6, 2019
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    France
    cPanel Access Level:
    Root Administrator
  6. GodLumeN

    GodLumeN Registered

    Joined:
    Feb 6, 2019
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    France
    cPanel Access Level:
    Root Administrator
    This is the error: This is the error: ERROR 2003 (HY000): Can't connect to MySQL server on 'xx.xx.xx.xx' (111 "Connection refused")
     
  7. GodLumeN

    GodLumeN Registered

    Joined:
    Feb 6, 2019
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    France
    cPanel Access Level:
    Root Administrator
    I found the issue,

    in /etc/my.cnf i had to remove bind-address=127.0.0.1
     
  8. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,161
    Likes Received:
    474
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @GodLumeN

    I'm really glad to hear you were able to identify the cause of the issue! Thanks for letting us know.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    GodLumeN likes this.
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