【发布时间】:2019-03-07 08:12:28
【问题描述】:
我正在尝试连接到我在 heroku 上的数据库,我将在我的应用程序中使用该数据库。我在 Windows 上使用命令行或 Git Bash。
我在 Heroku 上创建了名为 postgresql-rectangular-87454 的数据库并安装了 Postgres,没有任何错误。
输入 heroku addons 我确定,数据库已设置:
$ heroku addons
Add-on Plan Price State
──────────────────────────────────────────────── ───────── ───── ───────
heroku-postgresql (postgresql-rectangular-87454) hobby-dev free created
└─ as DATABASE
但是当我尝试通过heroku pg:psql 或heroku pg:psql postgresql-rectangular-87454 --app salty-shelf-36209 连接它时,我收到此错误:
$ heroku pg:psql
--> Connecting to postgresql-rectangular-87454
psql: could not connect to server: Connection timed out (0x0000274C/10060)
Is the server running on host "ec2-54-225-97-112.compute-1.amazonaws.com" (54.225.97.112) and accepting
TCP/IP connections on port 5432?
任何建议将不胜感激。谢谢!
【问题讨论】:
标签: node.js postgresql heroku psql