heroku - 如何从 Heroku 外部连接到 Heroku Postgres 数据库
问题描述
我正在尝试使用外部客户端连接到与我的 Heroku 应用程序关联的 Postgres 数据库(爱好开发)。
我已经阅读了文档(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 仪表板中没有看到与此相关的设置(例如绑定地址或类似的东西)。
解决方案
推荐阅读
- google-apps-script - Google 表格:根据单元格值隐藏行 是/否
- api - 如何使用 Foswiki API 从外部系统访问表单元数据(单元格内容)
- asp.net - Elmah 没有看到数据库
- mysql - 用于 nil:NilClass 的 Rails 未定义方法“电子邮件”
- azure - 想要创建 Azure 逻辑应用表达式
- javascript - package.json - 如何确定安装了模块的哪些部分
- c - 替换整个单词而不是C中字符串中的子字符串
- android - 在 Flutter 和 Native Code 中使用 Firestore 缓存行为
- javascript - 高阶 React 组件中可选参数的流类型
- android - Android 通知和广播接收器和 JobScheduler