psql: server does not support SSL, but SSL was required

Jyotirmay picture Jyotirmay · Apr 1, 2016 · Viewed 31.9k times · Source

Trying to connect to postgresql server using command prompt.

Command used:

psql "sslmode=require host=localhost dbname=test"

Error thrown:

psql: server does not support SSL, but SSL was required

enter image description here

Please help me out on this. Thanks.

Answer

Burki picture Burki · Apr 1, 2016

This link suggests that you might try

psql "sslmode=disable host=localhost dbname=test"

or (probably better)

psql "sslmode=allow host=localhost dbname=test"

That way you should be able to connect to your server.