美文网首页
【PostgreSQL】FATAL: Ident authent

【PostgreSQL】FATAL: Ident authent

作者: 周易与交易策略 | 来源:发表于2019-11-25 02:42 被阅读0次

问题描述

      项目部署在服务器上(数据库postgresql同样是安装在该服务器上),启动时发现报错,org.postgresql.util.PSQLException: FATAL: Ident authentication failed for user "ptms"。

问题原因

      postgresql的一个配置文件pg_hba.conf中没有信任该服务器ip导致报错。

解决办法

      修改pg_hba.conf配置文件相应的地方,将其改为trust。

      如果找不到该文件,可使用如下命令进行查找

find / -name pg_hba.conf

      重新启动postgresql服务,即可!

systemctl restart postgresql-10.service

相关文章

网友评论

      本文标题:【PostgreSQL】FATAL: Ident authent

      本文链接:https://www.haomeiwen.com/subject/uozrwctx.html