enabling outbound sql?

Post Reply
maestroc
Junior Member
Posts: 12
Joined: 10 Nov 2013, 20:01

enabling outbound sql?

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

Re: enabling outbound sql?

Post 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:

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

Re: enabling outbound sql?

Post by StanleyPoter »

Hey, I also have the same issue. Thank you for your solution.
Post Reply