Using psql to connect to PostgreSQL in SSL mode

后端 未结 7 1461
攒了一身酷
攒了一身酷 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条回答
  •  旧时难觅i
    2021-01-30 08:35

    Well, you cloud provide all the information with following command in CLI, if connection requires in SSL mode:

    psql "sslmode=verify-ca sslrootcert=server-ca.pem sslcert=client-cert.pem sslkey=client-key.pem hostaddr=your_host port=5432 user=your_user dbname=your_db" 
    

提交回复
热议问题