【问题标题】:postgresql 9.3 ident authentication failed for user用户的 postgresql 9.3 ident 身份验证失败
【发布时间】:2014-10-17 18:42:00
【问题描述】:

无法通过 yii2 迁移脚本登录 postgresql。在 centos 7 上运行

致命错误总是

Error:  SQLSTATE(08006) [7] FATAL:   Ident authentication failed for user "username"

我已更改 pg_hba.conf 中不再包含 ident 以进行身份​​验证。但它仍在尝试针对 ident 而不是 trust、password 或 md5 运行(尝试了所有这些)

我猜由于某种原因它没有读取 pg_hba.conf 文件,我在 postgresql.conf 中手动添加了完整路径,但仍然说 ident 身份验证失败。

pg_hba.conf 包含

local   all             all                                     password
host    all             all             127.0.0.1/32            password
host    all             all             ::1/128                 password

我可以从命令行登录没问题。

【问题讨论】:

    标签: postgresql yii2 centos7


    【解决方案1】:

    您使用 systemctl start postgresql-9.3 启动服务,但停止和重新启动不会重新加载数据。我必须重新启动服务器才能重新加载数据。

    第一次尝试

    systemctl stop postgresql-9.3
    systemctl start postgresql-9.3
    

    如果这不起作用,请重新启动您的机器

    【讨论】:

      猜你喜欢
      • 2014-07-17
      • 2018-10-09
      • 1970-01-01
      • 2015-07-04
      • 2020-11-30
      • 2015-06-18
      • 2017-07-25
      • 1970-01-01
      • 2013-07-23
      相关资源
      最近更新 更多