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