0

好的,问题来了:我想上传一个我在本地获得的数据库,并且我在 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 应用程序地址,谁能告诉我如何获得正确的地址?

4

1 回答 1

0

您需要安装并运行 postgresql

于 2013-01-25T13:37:41.043 回答