aws mysql 远程连接,无法远程连接到AWS的RDS数据库实例

本文介绍了在配置AWS数据库实例后遇到的连接问题及排查步骤。包括检查安全组设置、子网类型、路由表规则和互联网网关等。并强调了不应公开数据库地址的安全建议。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

I have a problem with connect to DB instance of AWS after I config that:

I already add this DB instance to the Security Group with RULE: MySQL - TCP - port:3306 and source is Anywhere.

But when I try to remote connect via CLI that show error (10060).

Note: All of them i manipulation at US West (Oregon) and have Security Group Rule.

解决方案

A couple of things to check

Security group (you did that already, looks good)

Subnet is public ? i.e. it has a Routing Table that includes a Rule that says 0.0.0.0/0 DST Internet Gateway

Internet Gateway is attached to your VPC

On a side note, I would strongly discourage to make your database publicly available on the internet. In an ideal world, your database must have only a private IP address and must be available only from your app servers. Should you really need to be able to access your database from the Internet, your Security Group should be restricted to a /32 IP address

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值