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 not working

Discussion in 'Database Discussion' started by darkshifty, Jan 11, 2017.

  1. darkshifty

    darkshifty Member

    Oct 14, 2016
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    I'm trying to open a database to a specific ip but it doesn't seem to work at all.
    I've did the following steps as adding the ip to the allowed hosts doesn't work

    * WHM »SQL Services »Additional MySQL Access Hosts
    * CPanel »Databases » Remote MySQL
    * Opened port 3360 in Firewalld

    firewall-cmd --permanent --zone=public --add-rich-rule='
    rule family="ipv4"
    source address="--.--.---.--(allowed ip adres)"
    port protocol="tcp" port="3306" accept'

    checked /etc/my.cnf if it contained "skip-networking", it doesn't.

    Now i can connect but i receive the following error:
    Failed to connect to the database: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it.

    Note: i have a user and DB with all privileges .
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator

    Could you verify how you are attempting to access MySQL from the remote machine? Is it through the command line, or with a specific application?

    You may want to consider installing a firewall management utility such as CSF to help manage the firewall rules on the system and to ensure the issue isn't related to your custom firewalld rules.

    Thank you.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

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