我正在尝试将本地psql数据库复制到heroku psql。使用Windows。
D:\code\intelBot>heroku pg --app intelbot-tembu
=== DATABASE_URL
Plan: Hobby-dev
Status: Available
Connections: 0/20
PG Version: 12.4
Created: 2020-09-10 08:14 UTC
Data Size: 7.9 MB
Tables: 0
Rows: 0/10000 (In compliance)
Fork/Follow: Unsupported
Rollback: Unsupported
Continuous Protection: Off
Add-on: postgresql-transparent-53164
这似乎表明数据库已启动? 但我无法与pg:push
连接D:\code\intelBot>heroku pg:push intelbot postgresql-transparent-53164 --app intelbot-tembu
heroku-cli: Pushing intelbot ---> postgresql-transparent-53164
psql: error: could not connect to server: could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "ec2-34-225-162-157.compute-1.amazonaws.com" (34.225.162.157) and accepting
TCP/IP connections on port 5432?
! Remote database is not empty. Please create a new database or use heroku pg:reset
我相信Remote database is not empty
可能也是一个错误,因为该数据库根本没有被修改,如果无法连接,它也不知道该数据库是否为空。
我也尝试过通过pgAdmin连接到数据库,但是遇到同样的连接问题。 网页上的数据库凭据显示它正在端口5432上运行