【问题标题】:I'm having trouble with password field while using pg:pull with my Heroku postgres database我在使用 pg:pull 和 Heroku postgres 数据库时遇到密码字段问题
【发布时间】:2017-06-13 16:55:11
【问题描述】:

我正在使用具有ubuntu 操作系统的Cloud9 IDE。我最近从我的 Rails 应用程序中卸载了本地 SQLlite3 数据库,并成功安装了本地 postgres 数据库。我现在正试图从 Heroku 中提取 postgres 生产数据库。

如果我在 Rails 控制台中运行 ActiveRecord::Base.connection.instance_variable_get(:@config):

{:adapter=>"postgresql", :encoding=>"unicode", :pool=>5, :template=>"template0", :username=>"ubuntu", :password=>"password", :database=>"learning_app_development"}

根据these 指令从命令行:

$ heroku pg:pull DATABASE_URL mylocaldb --app my-app-6503

heroku-cli:拉取 postgresql-meadows-7463 ---> mylocaldb
密码:

我在此字段输入密码后,失败:

createdb:无法连接到数据库模板 1:致命:用户“ubuntu”的密码验证失败

This answer by Elliot 是我在本地设置 postgres 时遵循的说明。

【问题讨论】:

    标签: ruby-on-rails postgresql heroku


    【解决方案1】:

    我用这个答案解决了这个问题:

    heroku pg:pull password authentication failed

    来自乔尔。

    除了 Heroku 可能不接受密码作为密码之外,这对我来说没有任何意义?

    【讨论】:

      猜你喜欢
      • 2017-05-24
      • 1970-01-01
      • 2011-08-16
      • 2014-02-08
      • 2020-04-07
      • 1970-01-01
      • 2015-01-31
      • 1970-01-01
      • 2020-05-06
      相关资源
      最近更新 更多