Kar*_*pan 5 amazon-web-services amazon-rds
我正在使用 AWS RDS,我想远程连接到数据库。然而,我不断得到
Database connection failed due to connection to server at
"mydb.12345.eu-central-1.rds.amazonaws.com" (x.xx.xxx.xx),
port 5432 failed: Connection timed out (0x0000274C/10060)
Is the server running on that host and accepting TCP/IP connections?
Run Code Online (Sandbox Code Playgroud)
这些似乎是一个非常常见的问题,所有解决方案都建议应将入站规则设置为接受来自您自己的 IP 的所有流量。
然而,对我来说这并不能解决问题。
这是我的设置:
这些是安全组中的入站规则sg-650cbe0b
我还尝试添加入站规则,例如:
或者
但这没有用。
我尝试通过移动网络进行连接(以查看是否是防火墙问题),但出现了相同的错误。
不过,我从 AWS Lambda 函数内访问该数据库,并且没有任何问题。
这是我用来访问数据库的代码:
Database connection failed due to connection to server at
"mydb.12345.eu-central-1.rds.amazonaws.com" (x.xx.xxx.xx),
port 5432 failed: Connection timed out (0x0000274C/10060)
Is the server running on that host and accepting TCP/IP connections?
Run Code Online (Sandbox Code Playgroud)
RDS 连接失败的原因有多种,包括:
我推荐RDS 连接问题排查程序:如何排查与使用 VPC 公有或私有子网的 Amazon RDS 数据库实例的连接问题?
| 归档时间: |
|
| 查看次数: |
5575 次 |
| 最近记录: |