Skip to main content

cPanel can't connect to MySQL server (Remote)

Comments

5 comments

  • Michael Legg
    I found the problem, when the MySQL was rebooted last night it didn't load my iptables rules, so it was blocking all remote connections to MySQL. I've re-enabled and re-saved the rules, but now I have to work out why they didn't load automatically.
    0
  • Michael Legg
    The problem was that I added my rules to iptables, unaware that Centos 7 uses firewalld to manage the firewall rather than the iptables service. So although the iptables rules work, firewalld is unaware of them and thus does not load them on reboot. I've installed the iptables services and disabled firewalld so iptables now manages the firewall and will reload them on boot.
    0
  • 24x7server
    Hi, To have it work even better I would suggest you use ConfigServer Firewall (CSF), which will make it easy for you to manage the firewall and then never face such issue again after a reboot..
    0
  • Michael Legg
    Thanks, but it was the firewall on the MySQL server, not the cPanel server that was the problem.
    0
  • cPanelMichael
    Hello, I'm glad to see you were able to solve the issue. Thank you for sharing the outcome.
    0

Please sign in to leave a comment.