enabling outbound sql?

3 posts Page 1 of 1
maestroc
Junior Member
Posts: 6
Joined: 10 Nov 2013, 20:01


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?
maestroc
Junior Member
Posts: 6
Joined: 10 Nov 2013, 20:01


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:

tcp:in:d=3306:d=xx.xx.xx.xx

where the xx is the IP of the remote SQL server. For more info look at this page where I found the answer at: https://www.crybit.com/enable-remote-mysql-csf/
StanleyPoter
Junior Member
Posts: 1
Joined: 08 Jul 2019, 11:58


Hey, I also have the same issue. Thank you for your solution.
3 posts Page 1 of 1