Well-Known Member
Aug 23, 2012
cPanel Access Level
Reseller Owner
I have a site on a WHM/CentOS dedicated server. 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

If this winds up being a CSF issue let me know and I'll ask over there but starting here in case it is something else.

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?


Well-Known Member
May 30, 2014
cPanel Access Level
Root Administrator
Please whitelist the source server IP on the sql server for SQL connections. Also check if outgoing sql connections are allowed on the source server, most probably, this is an issue with firewall.