postgresql 开启远程访问

修改pg_hba.conf文件,开通局域网的访问权限,注意IP地址改为自己所在网络的IP。 红色部分为新增内容。

 

# TYPE DATABASE USER ADDRESS METHOD

# IPv4 local connections:
host all all 127.0.0.1/32 md5
host all all 192.168.3.0/24 md5

host all all 0.0.0.0/0 md5
# IPv6 local connections:
host all all ::1/128 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
#host replication postgres 127.0.0.1/32 md5
#host replication postgres ::1/128 md5

posted @ 2020-08-25 09:50  googlegis  阅读(1646)  评论(0编辑  收藏  举报

坐标合肥,非典型GIS开发人员 GitHub