加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

postgreSQL远程连接出现:Error connecting to server :致命错误

发布时间:2020-12-13 17:03:36 所属栏目:百科 来源:网络整理
导读:转自: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 onlylocal all all ident# IPv4 local co
转自: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          # 移除注释

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读