Report this

What is the reason for this report?

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

Posted on December 16, 2020

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 "123.231.108.177", user "bconic_survey_admin", database "bconic_survey", SSL off

Have I done any mistake upto here ?



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.

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.