`initialize':fe_sendauth:没有提供密码(PG :: ConnectionBad)

时间:2016-06-14 17:34:55

标签: ruby-on-rails postgresql rails-postgresql

我是postgresql的新手。我试图在rails上使用带ruby的postgresql。我刚刚安装了postgresql,我刚刚创建了我的数据库。但是当我尝试在端口5432上的localhost上运行postgresql时,我得到了上述错误。

1 个答案:

答案 0 :(得分:0)

是的,我找到了解决方案:

我将pg_hba.conf中的设置更改为

# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust

最初而不是trustmd5。 然后只是做service postgresql restrart就行了!!