在 postgresql.conf 中我有:
listen_addresses = "*"
我的 pg_hba.conf 看起来像:
local all postgres md5
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all peer
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
#host all all myIPADDRESS md5
如果我取消最后一行的注释
- pgadmin 说它无法访问并确定端口是否可以访问。我已将 iptables 刷新为没有规则,因此防火墙不会阻止它。
- 无法从我的脚本本地访问数据库
最后一行注释:
- pgadmin 说我的 IP 地址没有 pg_hba.con 条目
- 我能够从我的脚本访问服务器本地的数据库
我缺少什么来使配置正确?
谢谢。
最佳答案
关于postgresql - 使用 pgadmin 远程访问 postgresql,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38448057/