在这几天我无法连接到我的本地机器上的我的 postgreSQL 数据库,运行 mac os ML。
我的机器的 nmap 显示 postgres 正在 5432 上运行,我可以通过 pgadmin 和 psql 在本地连接。
pg_hba.conf file for postgres
local all all trust
host all all 127.0.0.1/32 trust
host all all 192.168.0.2/16 trust
监听地址设置为 *
当我尝试连接 JDBC 时出现以下异常
org.postgresql.util.PSQLException:连接被拒绝。检查主机名和端口是否正确以及 postmaster 是否接受 TCP/IP 连接。