您的位置:首页 > 数据库

PostgreSQL一些简单问题以及解决办法

2010-10-25 17:11 375 查看
问题:

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"
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: