sqldatabasepostgresqlsslpostgresql-9.5

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


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.


Solution

  • 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.