问题
Navicat 工具连接服务器上的 PostgreSQL 数据库时报错
解决
通过修改 PostgreSQL 的配置文件来允许远程连接
修改 data/pg_hba.conf
文件
linux 下搜索 pg_hba.conf 文件所在路径
# 在 /var 目录下查找文件
find /var -name pg_hba.conf
# 在 root 目录下查找文件
find / -name pg_hba.conf
增加配置项
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# 指定 37 网段可以连接
host all all 10.X.37.1/24 md5
<