2014-10-17 116 views
-1

無法通過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 

我可以通過命令行登錄沒有問題。

回答

0

您使用systemctl start postgresql-9.3啓動服務,但停止並重新啓動時不會重新加載數據。我必須重新啓動服務器才能重新加載數據。

第一次嘗試

systemctl stop postgresql-9.3 
systemctl start postgresql-9.3 

如果還是不行,請重新啓動機器