Skip to main content

Remote MYSQL Access Connection

Comments

5 comments

  • cPanelMichael
    I have tested to connect to my main servers IP and port 3306 And also the deddicated ip of the cPanel account and port 3306. I get connection Refused when i try from Putty.

    Hello, Could you try using the "telnet" command from the remote server that's making the connection to your MySQL service? EX:
    telnet domain.tld 3306
    Does this connection succeed or fail? Also, you may want to try installing a firewall management tool such as CSF and then configuring CSF to allow connections to port 3306 (or adding a specific host or IP to the whitelist): ConfigServer Security & Firewall (csf) Thank you.
    0
  • orrevs
    Thank you for response I have installed it now, but when i look at listening open ports the 3306 is not displayed. Ports listening for external connections and the executables running behind them: there is no 3306 port here. Do i need to enable it some how? Mysql works fine locally on all sites just not remote but how can it work if port is not listening?
    0
  • orrevs
    I found the issue, in /etc/my.cnf i had to remove bind-address=127.0.0.1 Apperently if local adress is binded you cannot connect remotly! Thanks!
    0
  • cPanelMichael
    I'm happy to see the issue is now solved. Thank you for updating us with the outcome.
    0
  • Hawar Koyi
    You can also change it into bind-address=* Then restart MySQL service (service mysql restart)
    0

Please sign in to leave a comment.