[英]psql: FATAL: Ident authentication failed for user “postgres”
我已經按照#335廣播設置了Ubuntu VPS。 我已經解決了幾個問題,但是在啟動Unicorn時無法克服上面的錯誤。 從那以后,我一直在測試使用此命令連接到數據庫。
psql -U postgres -W
我已經如下編輯/etc/postgresql/8.4/main/pg_hba.conf
# Database administrative login by Unix domain socket
local all postgres trust
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
我使用什么方法(信任,md5,密碼)似乎都沒有關系,錯誤是相同的。
任何想法,將不勝感激。
根據我的設置,請使用以下設置可以幫助此設置親愛的...
托管所有0.0.0.0/0 md5
托管所有所有127.0.0.1/32 md5
托管所有所有:: 1/128 md5
嘗試使用psql -U postgres -h localhost
通常,您以postgres
用戶身份使用sudo -u postgres psql
。 請注意, sudo
提示輸入當前用戶的密碼(除非您是root用戶),而不是數據庫中的用戶。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.