pg添加链接IP白名单————PostgreSQL在配置文件pg_hba.conf添加IP操作
1,找pg_hba.conf的位置:linux环境下,在/pfdb/pgdata 或者 在/var/lib/pgsql/11/data/pg_hba.conf路径下。
2,修改其内容:
# IPv4 local connections:host all all 127.0.0.1/32 md5host all all 192.168.199.1/24 md5host all all 172.30.0.1/24 md53,重启服务
service postgresql reload(需root密码)或者
pg[0-9]/bin/pg_ctl stop
pg[0-9]/bin/pg_ctl start

浙公网安备 33010602011771号