當我嘗試從命令行登錄這樣獲得認證PostgreSQL的命令行失敗的錯誤
psql -h dbserver -U testuser test
然後我得到這個錯誤
psql: FATAL: Ident authentication failed for user "testuser"
這是我
nano -w /var/lib/pgsql/data/pg_hba.conf
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all ident
# IPv4 local connections:
host all all 127.0.0.1/32 password
# IPv6 local connections:
host all all ::1/128 ident
host all all 192.168.0.1/24 password
做你有運行? –
您是否授予該用戶的登錄權限? – andrefsp
將'local all all ident'行更改爲'local all all md5',然後按照Craig的答案或運行identd。 –