【发布时间】:2020-03-01 06:40:37
【问题描述】:
我正在尝试从 psql 会话连接到本地运行的 postgresql:
psql -h 192.168.195.84 -d aact_bac
pg_hba.conf 条目是:
host all all 0.0.0.0/0 md5
host all all 192.168.195.84/0 md5
结果如下:
psql: FATAL: psql: FATAL: no pg_hba.conf entry for host "192.168.195.84",
user "pointr", database "aact_back", SSL o for host "192.168.195.84",
user "pointr", database "aact_back", SSL o
这里缺少什么?
更新以下操作已多次执行 - 在每次尝试更改 pg_hba.conf 之后:
sudo service postgresql restart
从ps -ef | grep postgres查看启动时间,确认pg服务器已经重启。
【问题讨论】:
-
您没有指定掩码长度
192.168.195.84/32。也不要忘记重新加载。 -
所以“本地”不代表“本地主机”?
-
假设postgresql 10或更新版本,你能检查
select * from pg_hba_file_rules的结果吗
标签: postgresql