[英]`initialize': fe_sendauth: no password supplied (PG::ConnectionBad)
I am new to postgresql. 我是Postgresql的新手。 I am trying to use postgresql with ruby on rails.
我正在尝试将postgresql与ruby一起使用。 I have just installed postgresql and I have just created my database.
我刚刚安装了postgresql,并且刚刚创建了数据库。 But when I try to run postgresql on localhost on port 5432 I get the above error.
但是,当我尝试在端口5432的本地主机上运行postgresql时,出现上述错误。
Yeah, I figured out the solution: 是的,我想出了解决方案:
I changed my settings in pg_hba.conf
to 我将
pg_hba.conf
中的设置更改为
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
where initially instead of trust
it was md5
. 最初是
md5
而不是trust
。 Then just doing service postgresql restrart
did the trick!! 然后只做
service postgresql restrart
就可以了!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.