-1

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

致命错误总是

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

我已更改 pg_hba.conf 中不再有 ident 进行身份验证。但它仍在尝试针对 ident 而不是信任、密码或 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

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

4

1 回答 1

0

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

第一次尝试

systemctl stop postgresql-9.3
systemctl start postgresql-9.3

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

于 2014-10-17T19:07:46.937 回答