The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Remote MySQL not working

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

Tags:
  1. darkshifty

    darkshifty Registered

    Joined:
    Oct 14, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Netherlands
    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

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    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.
     
Loading...

Share This Page