使用pg_dump工具创建转储文件

时间:2013-01-25 09:02:15

标签: database postgresql command-line port heroku-toolbelt

我正在尝试使用指定here的pg_dump工具创建转储文件,但我一直得到这个结果:

$ PGPASSWORD=mypassword pg_dump -Fc --no-acl --no-owner -h localhost -U myuser app_db > app_db.dump
  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?

我正在使用OSX Lion进行集会排序,但仍然不知道如何打开或关闭端口,所以,如果这是问题,请告诉我如何打开它,如果问题是其他的请告诉我它是什么(以及如何解决)

谢谢

1 个答案:

答案 0 :(得分:1)

您需要安装并运行postgresql