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=*

原文地址:https://www.cnblogs.com/yldf/p/11900065.html