Can not connect to remote database over IP and port 3306

Hello All,
Yes, this problem has been mentioned here several times already. However after reading ALL posts I could find there is nothing that remotely points to a solution other then the usual “check the obvious”.

However we have done more than checking the IP and port rules in the firewall both at digital ocean where the website resides and on the server where the database is located, including the firewalls in both Digital Ocean droplet and Cloudflare for the website. We have run through every possible combination of options.

However as soon as we PAUSE Cloudflare on the website than it can reach the remote database server at hour private server host. And when we enable Cloudflare for our website we receive the infamous gateway time-out error.

So far the only thing we have been able to prove with all our testing is that the problem lies with Cloudflare…but WHERE, which setting at what level, network, application WAF…where???

Thank you, amd much appreciated with ANY help that can be provided.

Cloudflare’s proxy is only for specific ports, and only HTTP(S) traffic.

You would need to access other services on an unproxied (DNS Only) record.

Hello KianNH, Thank you very much for your response. Would you be able to point me to an example of how to setup such a DNS only record? I know how to set up most other DNS records, but not familiar with your suggestion?

So any record that is proxied on the dashboard (it’s labelled Proxied :orange: ) will be routed through Cloudflare.

Since Cloudflare only routes HTTP(S) traffic*, you’ll need to turn off Proxied so that the DNS record is grey (Unproxied :grey:). Do note that this will expose your origin IP address because traffic is not being routed through Cloudflare.

*with the exception of Spectrum which is somewhat cost-prohibitive for individuals, especially for database traffic

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.