Page 1 of 1

enabling outbound sql?

Posted: 03 Jul 2019, 01:37
by maestroc
I have a site on a WHM/CentOS dedicated server using CSF. This 144.x.x.x server has a client who has a remote database on a different server (37.x.x.x) and he needs to connect his script from the local server over to that 37.x server using a remote MySQL connection.
Up until now all he gets when we try to connect is the error:

IP Be 144.x.x.xFailed to connect to MySQL: (2002) Connection refused

I am guessing that error means that 144.x is blocking outbound connections? If so, any idea what I need to open up in order to enable this outbound SQL connection? If not, any ideas on how to get this connection working?

Re: enabling outbound sql?

Posted: 06 Jul 2019, 16:04
by maestroc
Finally got it figured out on my own. Posting this here in case someone else needs it. In the csf.allow file add the following line:


where the xx is the IP of the remote SQL server. For more info look at this page where I found the answer at:

Re: enabling outbound sql?

Posted: 08 Jul 2019, 12:00
by StanleyPoter
Hey, I also have the same issue. Thank you for your solution.