获取错误:当试图让pgsql使用rails时,用户“postgres”的对等身份验证失败

时间:2016-10-17 22:56:42

标签: ruby-on-rails postgresql

当我尝试使用Rails进行postgres时。

致命:用户“postgres”的对等身份验证失败

我有9.6版本和9.5 postgresql 我记得我创建了一个名为postgresql的用户

for connect with it i do first:
sudo su
su - postgres
psql
\l

我的用户:http://pastebin.com/kKH4qjsr 这是我的pg_hba.conf:http://pastebin.com/VnxbQCDW 我投入了我的项目postgres但我无法连接

1 个答案:

答案 0 :(得分:0)

pg_hba.conf文件中,使用trust身份验证方法代替md5

# IPv4 local connections:

host    all             all             127.0.0.1/32            trust