Private connection to Managed DB not working from within same region droplet.

I have a droplet in the same region as my managed DB, like DO suggested. I have added my IP and droplet to the Restricted Access section of the managed database. I can connect via public connection from my computer. If I try connecting from within the droplet using private credentials, no error message, just timeout. Is there a step I’m missing? I even disabled the droplet’s firewall thinking the port was being blocked.


Submit an 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.

In case anyone is still having this issue here are some steps to take that will solve this for you.

A couple of things to keep in mind your droplets have to be in the same region as the managed DB to use the private connection.

Now, if that’s all set here’s the next steps. This makes the assumption that you are adding private networking after already having created your managed db.

Step 1 - If you’ve enabled Private Networking for your droplet and followed the instructions to add the private IP address you can SSH into your droplet and use the Connection String with Flags to make sure you’re managed DB knows to let your droplet traffic through.

Step 2(A) - It worked? Great! Your app is probably not configured correctly to use the private connection.

Step 2(B) - The connection is still timing out? No worries, copy the private IP address of the droplet and then navigate to your managed DB settings, then add the private IP address as under “Trusted sources”, make sure you specifically use the IP address, and then save.

Step 2© - Test your connection using Connection String > Flags again from your droplets ssh session. You should now be connecting!

For some reason, it appears that using the tags does not add the private IP to the managed DB’s trusted sources list, but adding it manually works. This isn’t very scalable though 🤔😡

Hi everyone, I believe that private networking access is also limited to droplets on the same region and account. If you try to connect from another Digital Ocean account, it will not work.

If you added private networking after your droplet was created, you have to enable it manually:

This fixed my issue.

Same issue here. The public host works but the private doesn’t.

I’m having the same issue… solution is to use the public IP for now :/

Same issue - still searching for a solution - the public network works fine.

Same here. Anyone find a solution?

Just to test- I installed mysqlsh on the droplet and tried to connect to the mysql server. It failed when I tried to connect via private network, but it succeeded in connecting through the public network.

It appears that the issue is limited to private networking only.

Same issue. MySQL managed DB in same region and Droplet has been added as a trusted source. External connection works via mysqlsh.

I’ve added the DB server port to cloud firewall, and allowed connections out on that port in UFW.

I attempted to disable restrictions by removing all entries from Trusted Sources, no dice.

We’re working on migrating all of our sites from Google Cloud Platform but this is holding up the process.

Same here - I’m getting timeouts when connecting.