微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

postgreSQL远程连接出现:Error connecting to server :致命错误 SSL关闭的pg_hba.conf记录

转自:http://www.cnblogs.com/Richard-xie/p/3834612.html

解决方案:

[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



 

备注:如出现监听异常,请修改

[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 renegotiations
password_encryption = on          # 移除注释

原文地址:https://www.jb51.cc/postgresql/194384.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐