Error When connecting PostgreSQL database in Digital ocean from my local PC

This is what I did to create a Database instance and access it Step 1 : I created my DB instance in digital ocean then I made my IP address as trusted source , got the credentials (host name , db name , user , password) to access it . Step 2 : downloaded postgreSQL to my local PC , opened the psql terminal window , and typed the credentials . Now I get an error .

psql: error: SSL SYSCALL error: Connection reset by peer (0x00002746/10054)
FATAL:  no pg_hba.conf entry for host "", user "bconic_survey_admin", database "bconic_survey", SSL off

Have I done any mistake upto here ?

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.

Hello, @tharikr

I will recommend you to double check our existing tutorial on how to connect to PostgreSQL databases here:

How to Connect to PostgreSQL Database Clusters

As for the error message itself, I think the crucial problem is the “SSL off” part.

The only required parameter is sslmode. If you notice, the connection string that DigitalOcean provides has “sslmode=require”

You can make sure that ssl is set to yes and give it another try.

Hope that this helps! Regards, Alex