The server doesn't grant access to the database: the server reports
FATAL: no pg_hba.conf entry for host "192.168.0.123", user "postgres", database "postgres" FATAL: no pg_hba.conf entry for host "192.168.0.123", user "postgres", database "postgres"sql
PostgreSQL数据库为了安全,它不会监听除本地之外的全部链接请求,当用户经过JDBC访问是,会报一些以下的异常:数据库
org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host安全
要解决这个问题,只须要在PostgreSQL数据库的安装目录下找到/data/pg_hba.conf,找到“# IPv4 local connections:”post
在其下加上请求链接的机器IPspa
host all all 127.0.0.1/32 md5postgresql
32是子网掩码的网段;md5是密码验证方法,能够改成trustserver