简体   繁体   English

'initialize':fe_sendauth:不提供密码(PG :: ConnectionBad)

[英]`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.

相关问题 PG :: ConnectionBad fe_sendauth:未提供密码 - PG::ConnectionBad fe_sendauth: no password supplied PG::ConnectionBad: fe_sendauth: 未提供密码 - PG::ConnectionBad: fe_sendauth: no password supplied 耙终止:PG :: ConnectionBad:fe_sendauth:未提供密码 - rake aborted:PG::ConnectionBad: fe_sendauth: no password supplied 修复方法:PG :: ConnectionBad:fe_sendauth:未提供密码 - how to fix: PG::ConnectionBad: fe_sendauth: no password supplied Rails / PostgreSQL问题:PG :: ConnectionBad:fe_sendauth:未提供密码 - Rails/PostgreSQL problem: PG::ConnectionBad: fe_sendauth: no password supplied 耙子流产了! PG :: ConnectionBad:fe_sendauth:没有提供密码 - rake aborted! PG::ConnectionBad: fe_sendauth: no password supplied capistrano,rails,PG :: ConnectionBad:fe_sendauth:没有提供密码 - capistrano, rails, PG::ConnectionBad: fe_sendauth: no password supplied Rails 控制台导致 PG::ConnectionBad: fe_sendauth: 没有提供密码 - Rails Console results in PG::ConnectionBad: fe_sendauth: no password supplied fe_sendauth:未提供密码 (PG::ConnectionBad) Docker 容器 - fe_sendauth: no password supplied (PG::ConnectionBad) Docker container pg_restore后,报错; PG::ConnectionBad fe_sendauth:未提供密码 - After pg_restore, an error; PG::ConnectionBad fe_sendauth: no password supplied
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM