CentOS安装配置完PostgreSQL无法连接的问题

连接数据库时,报如下错误:

psql: fatal: ident authentication failed for user "dbuser"

解决方法:

修改认证权限配置文件 /var/lib/pgsql/9.6/data/pg_hba.conf

原来:

# IPv4 local connections:
host all all 127.0.0.1/32  ident
修改为:
# IPv4 local connections:
host all all 127.0.0.1/32  password

命令行重启服务:password service postgresql-9.6 restart

即可连接。

 

posted @ 2019-04-23 17:02  lemon6959  阅读(475)  评论(0编辑  收藏  举报