user2436815
user2436815

Reputation: 3895

Connecting to Heroku Postgres Database using Navicat

I'm using Navicat to connect to Postgres running on my Heroku application. I entered the correct Host, Port, Database Name, User, Password, but I'm getting the following connection error:

enter image description here

I searched for the solutions to this error, and I modified pg_hba.conf by adding this line:

host all all 0.0.0.0/0 md5

also I uncommented the following lines in postgres.conf:

listen_address = '*'
port = 5432             # (change requires restart)
max_connections = 100       # (change requires restart)

I restarted Postgres, but Navicat still gives me the same error.

I thought the issue could have been the SSL settings, so I followed this manual: http://www.navicat.com/manual/online_manual/en/navicat_datamodeler/win_manual/SSLCert.html

Nevertheless, I am getting the same error.

Can anyone assume what the problem is?

Upvotes: 1

Views: 2036

Answers (3)

jaradus
jaradus

Reputation: 76

When you're setting up the Connection Properties, after you've filled out the information under the General tab (Host Name/IP Address, Port, Default Database, Username, and Password), click on the SSL tab.

Check Use SSL and under the dropdown list titled SSL Mode select require.

Then test the connection. Your connection should be successful.

Upvotes: 5

Thiago A. Klein
Thiago A. Klein

Reputation: 80

Try connect using SSL. Works for me.

Upvotes: 0

SQLGuyChuck
SQLGuyChuck

Reputation: 322

Ok, it seems you have same issue I do on Mac OS version of Navicat. I tried everything to fix also, and pgadmin was working just fine. The solution was to create a new connection as somehow this connection is corrupted and there is nothing you can do to fix it seems in the UI that I could find.

Upvotes: 1

Related Questions