问题使用pg_dumpl

时间:2013-01-24 13:26:51

标签: sql-server heroku connection pg-dump

好的,问题出在这里:我想上传一个我在本地使用的数据库,我在localhost中使用,但是,当我使用时:

PGPASSWORD=mypassword pg_dump -Fc --no-acl --no-owner -h localhost -U root app_db > app_db.dump

我总是得到:

pg_dump: [archiver (db)] connection to database "app_db" failed: could not connect to server: Connection refused
 Is the server running on host "localhost" and accepting
 TCP/IP connections on port 5432?
could not connect to server: Connection refused
 Is the server running on host "localhost" and accepting
 TCP/IP connections on port 5432?
could not connect to server: Connection refused
 Is the server running on host "localhost" and accepting
 TCP/IP connections on port 5432?

我认为问题在于我正在编写localhost而不是我的heroku应用程序地址,有人能告诉我如何才能获得正确的地址?

1 个答案:

答案 0 :(得分:0)

您需要安装并运行postgresql