postgreSQL遠程鏈接出現:Error connecting to server :致命錯誤 SSL關閉的pg_hba.conf記錄

異常截圖:sql

解決方案:dom

[root@www ~]# vi /var/lib/pgsql/data/pg_hba.conf
# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only
local   all         all                               ident
# IPv4 local connections:
host    all         all         127.0.0.1/32          ident
host    all         all         10.10.46.1/24          md5           # 新添加
# IPv6 local connections:
host    all         all         ::1/128               ident

 

備註:如出現監聽異常,請修改socket

[root@www ~]# vi /var/lib/pgsql/data/postgresql.conf 
listen_addresses = '*'                  # what IP address(es) to listen on; 移除註釋                                        # comma-separated list of addresses;                                        # defaults to 'localhost', '*' = all                                        # (change requires restart)port = 5432                             # (change requires restart) 移除註釋#ssl_renegotiation_limit = 512MB        # amount of data between renegotiationspassword_encryption = on          # 移除註釋
相關文章
相關標籤/搜索