PostgreSql允许远程连接

编辑$PGDATA/pg_hba.conf

添加如下配置

host    all             all             0.0.0.0/0              md5
  • 允许特定ip主机连接
    host all all 0.0.0.0/0 md5
  • 允许特定网段的主机连接
    host all all 192.168.1.0/24 md5

编辑$PGDATA/postgresql.conf

设置listen_addr=*

posted @ 2018-10-23 16:10  岳麓丹枫  阅读(321)  评论(0编辑  收藏  举报