首页 > 解决方案 > 我无法连接到 rails 中的 postgres amazon rds

问题描述

下面是我的database.yml

development:
  adapter: postgresql
  encoding: unicode
  host: <my_aws_end_url>
  database: <my_db_name>
  pool: 5432
  username: <my_username>
  password: <my_password>

我得到的错误如下:

PG::ConnectionBad: could not connect to server: Connection timed out

我已经在 aws 中验证了最终 url,并将我的入站设置为所有流量。我也尝试使用 pgadmin 连接并得到同样的错误。

标签: postgresqlamazon-web-servicesruby-on-rails-5

解决方案


推荐阅读