wro*_*ame 5 postgresql amazon-ec2 rds
我有一个带有两个私有子网的 VPC(需要两个子网才能设置 RDS 实例)。我有这个 VPC 的安全组,我们称之为vpc-sg。vpc-sg允许从我的家用机器在端口 22 上进行 TCP 访问,并允许所有出站流量。就是这样。
我在 VPC 内启动了一个面向公众的 EC2 服务器,我已将公共弹性 IP 附加到该服务器。我正在使用 EIP ssh 进入这个 EC2 服务器。我将安全组设置为vpc-sg. 我在 EC2 实例上安装了 PostgreSQL 9.2。
我在同一个 VPC 中有一个 RDS 实例。它也vpc-sg用于安全组。创建实例时,我被迫选择 PostgreSQL 9.3 版。我尝试从我的 EC2 实例访问 RDS PostgreSQL 数据库:
[ec2-user@ip-10-0-0-20 ~]$ psql the_db_name -U the_db_username -h my-db-instance.random-string.us-east-1.rds.amazonaws.com -p 5432 -W
Password for user the_db_username:
psql: could not connect to server: Connection timed out
Is the server running on host "my-db-instance.random-string.us-east-1.rds.amazonaws.com" (10.0.0.147) and accepting
TCP/IP connections on port 5432?
Run Code Online (Sandbox Code Playgroud)
我该怎么办?
编辑-我我得到没有入境许可的RDB错误,但不知道如何解决它。
| 归档时间: |
|
| 查看次数: |
14213 次 |
| 最近记录: |