简体   繁体   English

pg_restore后,报错; PG::ConnectionBad fe_sendauth:未提供密码

[英]After pg_restore, an error; PG::ConnectionBad fe_sendauth: no password supplied

I have just done the pg_restore in my local db with the heroku downloaded db (last.dump).我刚刚使用heroku下载的数据库(last.dump)在本地数据库中完成了pg_restore。 And now I have an error;现在我有一个错误; PG::ConnectionBad fe_sendauth: no password supplied. PG::ConnectionBad fe_sendauth:未提供密码。 I'have added the username and password in database.yml but nothing.我在 database.yml 中添加了用户名和密码,但没有。 What must I do?我必须做什么?

Finally I have solved adding 'username: postgres' and 'password: ***' in the general config part of database.yml;最后我解决了在database.yml的通用配置部分添加“用户名:postgres”和“密码:***”的问题;

default: &default
  adapter: postgresql
  encoding: unicode
  # For details on connection pooling, see Rails configuration guide
  # http://guides.rubyonrails.org/configuring.html#database-pooling
  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
  username: postgres
  password: ***

Not in the development part;不在开发部分;

 development:
  <<: *default
  database: CigBackCount_development

  # The specified database role being used to connect to postgres.
  # To create additional roles in postgres see `$ createuser --help`.
  # When left blank, postgres will use the default role. This is
  # the same name as the operating system user that initialized the database.
  #username: CigBackCount

  # The password associated with the postgres role (username).
  #password:

After the changes I have reload the DB;更改后,我重新加载了数据库;

pg_ctl reload

声明:本站的技术帖子网页,遵循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 &#39;initialize&#39;:fe_sendauth:不提供密码(PG :: ConnectionBad) - `initialize': fe_sendauth: no password supplied (PG::ConnectionBad) 耙子流产了! 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 fe_sendauth:未提供密码 (PG::ConnectionBad) Docker 容器 - fe_sendauth: no password supplied (PG::ConnectionBad) Docker container 将密码存储在 Rails 中的 ENV 变量中时收到“PG::ConnectionBad fe_sendauth:未提供密码”错误 - receiving “PG::ConnectionBad fe_sendauth: no password supplied” error when storing passwords in ENV variables in rails
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM