【问题标题】:Can't pull data base from heroku for my Django app无法从 heroku 为我的 Django 应用程序提取数据库
【发布时间】:2016-05-07 09:41:35
【问题描述】:

我正在尝试使用命令:

PGUSER=postgres PGPASSWORD=postgres heroku pg:pull DATABASE_URL localDB --app  django-www-app345

从我的 heroku 应用程序中提取 postgres DB。但它给了我错误:

!    createdb: could not connect to database template1: FATAL:  Peer authentication failed for user "postgres"
 !    
 !    Unable to create new local database. Ensure your local Postgres is working and try again.

我没有 template1 数据库,也没有 localDB,我的 postgres 用户是 postgres,我的密码也是

【问题讨论】:

    标签: django postgresql heroku


    【解决方案1】:

    查看您的 pga_hba.conf 文件并搜索此行:

    # TYPE DATABASE USER ADDRESS METHOD
    local  all      all          peer
    

    并将peer 更改为md5

    # TYPE DATABASE USER ADDRESS METHOD
    local  all      all          md5
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-11-28
      • 2014-09-12
      • 1970-01-01
      • 2018-04-22
      • 2019-11-08
      • 1970-01-01
      • 2021-10-27
      • 2016-05-26
      相关资源
      最近更新 更多