我正在开发一个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

任何见解都会非常感激 . 几个小时我一直在努力 . 谢谢!