无法使用pg:push将本地数据库推送到heroku

时间:2015-07-13 03:32:17

标签: postgresql heroku flask

我正在开发一个Flask项目,我准备将我的数据库部署到Heroku,但是当我尝试将本地数据库推送到PG数据库时,我收到以下错误。我搜索了其他StackOverflow帖子,但似乎没有提出的解决方案。以下是错误消息:

pg_dump: [archiver (db)] connection to database "database-name" failed: could not connect to server: Connection refused
    `Is the server running on host "localhost" (::1) and accepting`
    TCP/IP connections on port 5432?
could not connect to server: Connection refused
    Is the server running on host "localhost" (fe80::1) and accepting
    TCP/IP connections on port 5432?
could not connect to server: Connection refused
    Is the server running on host "localhost" (127.0.0.1) and accepting
    TCP/IP connections on port 5432?
pg_restore: [archiver] input file is too short (read 0, expected 5)
psql: could not connect to server: Connection refused
    Is the server running on host "localhost" (::1) and accepting
    TCP/IP connections on port 5432?
could not connect to server: Connection refused
    Is the server running on host "localhost" (fe80::1) and accepting
    TCP/IP connections on port 5432?
could not connect to server: Connection refused
    Is the server running on host "localhost" (127.0.0.1) and accepting
    TCP/IP connections on port 5432?
 !    Heroku client internal error.
 !    Search for help at: https://help.heroku.com
 !    Or report a bug at: https://github.com/heroku/heroku/issues/new

    Error:       psql failed. exit status 512, output: "" (RuntimeError)
    Command:     heroku pg:push database-name DATABASE_URL --app app-name
    Version:     heroku-toolbelt/3.39.5 (x86_64-darwin10.8.0) ruby/1.9.3
    Error ID:    020bc5cc53ec48298f24125be8705f53

非常感谢任何见解。我几个小时一直在努力。谢谢!

0 个答案:

没有答案