如何从Heroku外部连接到Heroku Postgres数据库

时间:2019-08-06 17:32:26

标签: heroku heroku-postgres

我正在尝试使用外部客户端连接到与我的Heroku应用程序关联的Postgres数据库(hobby-dev)。

我已经阅读了文档(https://devcenter.heroku.com/articles/connecting-to-heroku-postgres-databases-from-outside-of-heroku),这似乎是可能的,但是当尝试从客户端访问数据库时出现以下错误:

psql: could not connect to server: Connection refused
        Is the server running on host "[redacted].amazonaws.com" ([redacted ip address]) and accepting TCP/IP connections on port 5432?

从我经验不足的角度来看,似乎postgres实例拒绝某个IP范围之外的连接。我在Heroku仪表板中没有看到与此相关的设置(例如,绑定地址或类似内容)。

0 个答案:

没有答案