I’m connecting to my droplet fine on localhost, which proves that the IP, port, user and pw are correct, but when I load the same php code to a server that is supposed to connect to my DO database, I get:
PHP Fatal error: Uncaught mysqli_sql_exception: Connection timed out
Can anyone help me? this article doesn’t help becasue I can’t see the Control Panel (I have CLI) https://docs.digitalocean.com/products/databases/mysql/how-to/secure/#firewalls
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi there,
If you are using a Managed MySQL database cluster there are a few things that you need to make sure that you have in place:
25060
as your port in your connection string25060
for outgoing TCP connections so that the Droplet can connect to the MySQL clusterLet me know how it goes!
- Bobby