문제

Ok, here's the issue: I want to upload a DB I've got locally and I'm using in localhost, but, when I use:

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

I always get:

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?

I think the problem is that I'm writing localhost instead of my heroku app address, can anyone tell me how can I get the correct address?

도움이 되었습니까?

해결책

You need to have postgresql installed and running

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top