我用Yii2,DB連接Yii2 Postgres的錯誤 - fe_sendauth:沒有密碼提供
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'pgsql:host=localhost;dbname=data-storage',
'username' => 'data-storage',
'password' => '',
'charset' => 'utf8',
]
我的數據庫沒有密碼。我收到了一個錯誤:SQLSTATE [08006] [7] fe_sendauth:沒有提供密碼。 如果我使用一些密碼(只是假的,正如我所說,我沒有它)我得到:密碼驗證失敗的用戶「數據存儲」
pg_hba.conf中我有一個記錄我的域名:
host all all 172.28.3.70/32 trust
對PgAdmin可以正常工作。
幫助:http://stackoverflow.com/questions/17996957/fe-sendauth-no-password-supplied –