PostgreSQL:pg_hba.conf中的MD5身份验证给我致命:用户“ postgres”的对等身份验证失败]] << [

问题描述 投票:0回答:2
我正在运行Ubuntu 14.04,并安装了PostgreSQL 9.3。将

/ etc / postgresql / 9.3 / main / pg_hba.conf

编辑为:# "local" is for Unix domain socket connections only local all all md5 # IPv4 local connections: host all all 127.0.0.1/32 md5 # IPv6 local connections: host all all ::1/128 md5
我重新启动了服务器,现在我想以

postgres

身份登录到postgres:victor@workstation:~$ psql -U postgres psql: FATAL: Peer authentication failed for user "postgres"
由于我已将其身份验证方法设置为

MD5

,因此[postgres提示不要输入我的密码?
我知道,如果我添加

-h localhost

,它将起作用。
不添加此标志会导致psql使用对等身份验证吗?

我正在运行Ubuntu 14.04,并安装了PostgreSQL 9.3。将/etc/postgresql/9.3/main/pg_hba.conf编辑为:#“ local”用于Unix域套接字连接,仅本地所有...

postgresql authentication psql
2个回答
1
投票

0
投票
© www.soinside.com 2019 - 2024. All rights reserved.