Can't connect to manage database from my digital ocean droplet

I sipin off a digital ocean centOS droplet , configured and everything seems fine after going thorugh tutorials. I then purchased a managed digital ocean postgres db. It looks quite easy and so far so good. I manage to connect my DB with pgAdmin 4 from my PC, i even confirmed that my connection string is working from my nodejs app. I was able to connect and create y tables from my nodejs.

The problem is, my database refuse connection from within the droplet. I can test my manage database from local host and my PC, but the database and my droplet doesn’t communicate at all. My connection is always throwing timeout. I spent the whole day trying to figure out the problem, i even install pgsql on my droplet, tried the connections flags and couldn’t connect. I am confused and really wasn’t expecting the connect to be an issue here considering both my droplet and my manage DB comes from digital ocean. I couldn’t deploy because of this. Please what am i missing or doing wrong ? I confirmed by droplet has no firewall instance yet couldn’t communicate with the DB. Please any help would be appreciated, am really getting frustrated .

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Setting up the same thing so I can try it, on the second page of “Securing your new database cluster” did you fill in the “Add trusted sources” part when you set yours up? If you added your home PC IP address, it will block all other connection attempts.

Continuing with the setup to see if there are any other similar configs.

Another thing for you to check is to make sure you dont have a firewall interfering. Be back soon with any updates.