【发布时间】:2012-11-11 23:06:36
【问题描述】:
当我尝试像这样从命令行登录时
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
【问题讨论】:
-
你有 identd 跑步吗?
-
您是否授予该用户登录权限?
-
将行
local all all ident更改为local all all md5然后按照 Craig 的回答,或运行 identd。
标签: postgresql centos