Postgresql身份验证“信任”无效

时间:2018-12-25 13:19:28

标签: postgresql authentication

这就是我想要做的:

echo "local all all trust" >> /etc/postgresql/9.5/main/pg_hba.conf
systemctl restart postgresql
pgbench -i

然后我得到:

connection to database "" failed:
FATAL:  role "root" does not exist

如果我尝试使用现有用户:

pgbench -i -U postgres
connection to database "postgres" failed:
FATAL:  Peer authentication failed for user "postgres"

0 个答案:

没有答案