我試過使用主機變量PGPASSWORD
和.pgpass
這兩個都不會允許我對數據庫進行身份驗證。我已經chmod
倒是.pgpass
適當的權限,也試過:我怎樣才能得到pg_dump進行身份驗證
export PGPASSWORD=mypass and PGPASSWORD=mypass
密碼確實含有\
但是我在單引號包圍PGPASS='mypass\'
它,它仍然不會進行身份驗證。
我運行:
pg_dump dbname -U username -Fc
,我仍然收到
pg_dump: [archiver (db)] connection to database "dbname" failed: FATAL: Peer authentication failed for user "username"
「...對等認證...」部分錯誤信息表示它沒有使用[密碼認證](http://www.postgresql.org/docs/current/static/auth- methods.html#AUTH-PEER)。 –