问题:
org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
解决办法:Edit /var/lib/pgsql/data/postgresql.conf file
Change
#listen_addresses = 'localhost'
to
listen_addresses = '*'
问题:
org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "<host_ip>", user "fkong", database "fkong", SSL off
解决办法:
Edit /var/lib/pgsql/data/pg_hba.conf file
Add below line under "# IPv4 local connections:"
"host all all <host_ip>/32 password"
问题:
org.postgresql.util.PSQLException: FATAL: Ident authentication failed for user "fkong"
解决办法:
Edit /var/lib/pgsql/data/pg_hba.conf file
Change
"host all all <host_ip>/32 ident"
to
"host all all <host_ip>/32 password"
PostgreSQL一些简单问题以及解决办法
解决PostgreSQL连接问题
最新推荐文章于 2024-07-17 07:18:07 发布
本文介绍了如何解决在连接PostgreSQL数据库时遇到的常见错误,包括调整postgresql.conf文件以允许远程连接、修改pg_hba.conf配置文件来启用正确的认证方式等。
6077

被折叠的 条评论
为什么被折叠?



