Using psql to connect to PostgreSQL in SSL mode

后端 未结 7 1444
攒了一身酷
攒了一身酷 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:39

    psql "sslmode=require host=localhost port=2345 dbname=postgres" --username=some_user

    According to the postgres psql documentation, only the connection parameters should go in the conninfo string(that's why in our example, --username is not inside that string)

提交回复
热议问题