无法以新用户身份登录Postgres DB

时间:2017-04-09 18:00:12

标签: postgresql

我已经通过foreman-installer安装了Foreman(该软件包包括Postgres DB 9.5)。现在我想为Zabbix创建新的用户+新数据库,但似乎我做错了。该图显示了我输入的命令。新用户是成功创建的,但我无法登录到数据库。有人可以帮助我并解释问题出在哪里吗?

编辑:我添加了另一个线程(WITH LOGIN)中建议的选项,但它没有帮助我: enter image description here

1 个答案:

答案 0 :(得分:0)

I believe the answer is here.

In summary, "peer authentication" means postgres checked the username of the UNIX user (which is not zabbix), and ignored your -U option. Instead, you want to use "password authentication", which you can configure in your pg_hba.conf file. Check the link for instructions how to do that.