我已使用Postgres 10.6创建了一个AWS RDS实例
我正在尝试使用以下命令从本地系统连接到它:
psql --host=dev.xyz.ap-south-1.rds.amazonaws.com --port=5432 --user="postgres" --password --dbname=abc
我设置的入站规则为
允许来自任何地方的5432上的TCP通信。
仍然出现以下错误:
psql: could not connect to server: Connection timed out
Is the server running on host "dev.xyz.ap-south-1.rds.amazonaws.com" (xxx.xxx.xxx.xxx) and accepting
TCP/IP connections on port 5432?
答案 0 :(得分:0)
如果为Publicly accessible = No
,则将无法从VPC外部访问RDS数据库。
这是因为数据库的DNS名称不会解析为IP地址。