postgresql 9.3身份验证用户失败
问题描述:
无法通过yii2迁移脚本登录到postgresql。运行在CentOS 7postgresql 9.3身份验证用户失败
的致命错误是总是
Error: SQLSTATE(08006) [7] FATAL: Ident authentication failed for user "username"
我已经改变了的pg_hba.conf不再在它的ident认证。但它仍然试图运行反对身份而不是信任,密码或MD5(尝试所有这些)
我猜测,由于某种原因,它不读取pg_hba.conf文件,我已经手动添加完整路径在postgresql.conf中,但仍然表示身份验证失败。
的pg_hba.conf包含
local all all password
host all all 127.0.0.1/32 password
host all all ::1/128 password
我可以通过命令行登录没有问题。
答
您使用systemctl start postgresql-9.3启动服务,但停止并重新启动时不会重新加载数据。我必须重新启动服务器才能重新加载数据。
第一次尝试
systemctl stop postgresql-9.3
systemctl start postgresql-9.3
如果还是不行,请重新启动机器