美文网首页
fatal ident authentication faile

fatal ident authentication faile

作者: python都干了些什么啊 | 来源:发表于2019-10-08 00:39 被阅读0次

今天迁移服务器,新服务器安装postgresql后,启动站点后访问报错:

fatal ident authentication failed for user postgres centos 7

查了一下,需要找到 pg_hba.conf 这个配置文件做个修改:

#找到下面这句:
host all all 127.0.0.1/32 ident
#修改为:
host all all 127.0.0.1/32 md5

有的系统不太好找到 pg_hba.conf 配置文件,有个通用方法:

sudo su postgres

然后进入默认的文件夹,就会看到一个 postgresql 版本号的文件夹,进去后再进入data文件夹就找到配置文件了。

相关文章

网友评论

      本文标题:fatal ident authentication faile

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