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”
PostgreSQL database will not listen for all connection requests except local ones for security. When users access the database through JDBC, they will report some exceptions as follows:
org.postgresql.util.PSQLException: FATAL:nopg_ hba.confentryforhost
To solve this problem, you only need to find/data/PG in the installation directory of PostgreSQL database_ Hba.conf, find “# IPv4 local connections:”
Add the IP of the machine to which the connection is requested
hostall all 127.0.0.1/32 md5
32 is the segment of the subnet mask; MD5 is a password verification method, which can be changed to trust
Similar Posts:
- [Solved] createdb: could not connect to database postgres: FATAL: Peer authentication failed for user “postgres”
- [Solved] PSQL: fatal: the database system is starting up
- An error prompt appears during the installation of win10 PostgreSQL: “failed to load SQL modules into the database cluster”
- [Solved] zabbix Monitor postgres Error: “sh:psql command not found”
- [Solved] k8s Deploy postgresql Error: initdb: error: directory “/var/lib/postgresql/data” exists but is not empty
- [Solved] psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket “/var/run/postgresql/.s.PGSQL.5432”?
- [How to Solve] psql: FATAL: role “postgres” does not exist
- [Solved] Postgres Error: template1 is being accessed by other users
- The use of libpqxx interface in Linux solves the error of PSQL: connections on UNIX domain socket “/TMP/.S.pgsql.5432”
- FTP connection error 530 permission denied solution