-2
当你试图连接到Postgres的:Centos的Postgres的连接
# psql -h localhost dgrt postgres
I get an error:
#User "postgres" has not passed authentication (Ident)
配置我的文件 的postgresql.conf:
listen_addresses = '*'
的pg_hba.conf:
#Allow replication connections from localhost, by a user with the
#replication privilege.
host all all 127.0.0.1/32 ident
#UPDATE: 版本: CentOS 6的 PostgreSQL的9.3 – smilexcasper
你可能运行不Postgres的。当你使用'ident'作为本地主机时,使用'peer' - 这意味着你的os用户应该匹配postgres,所以要作为postgres登录到db你必须是postgres在操作系统 –
#UPDATE 2: 我需要连接而不是本地服务器,但远程服务器 #psql -h 10.10.10.2 dgrt postgres – smilexcasper