Using psql to connect to PostgreSQL in SSL mode

后端 未结 7 1460
攒了一身酷
攒了一身酷 2021-01-30 07:50

I am trying to configure ssl certificate for PostgreSQL server. I have created a certificate file (server.crt) and key (server.key) in data directory and update the parameter SS

7条回答
  •  爱一瞬间的悲伤
    2021-01-30 08:34

    On psql client v12, I could not find option in psql client to activate sslmode=verify-full.

    I ended up using environment variables :

    PGSSLMODE=verify-full PGSSLROOTCERT=server-ca.pem psql -h your_host -U your_user -W -d your_db
    

提交回复
热议问题