May*_*ank 5 mysql amazon-ec2 amazon-web-services amazon-rds amazon-vpc
我无法连接到我的 RDS 实例并继续获取
ERROR 2003 (HY000): Can't connect to MySQL server on "my endpoint"
Run Code Online (Sandbox Code Playgroud)
我知道出现此错误是因为我的 PC 由于公共可访问性而无权访问数据库,但我无法让我的 PC 在安全组中进行授权。
我打开了 RDS 安全组,它说:
Using VPC? Visit the VPC page to create or manage VPC Security Groups and ingress rules to your DB Instances in VPC. Learn more about the differences between DB Security Groups and VPC Security Groups here.
Your account does not support the EC2-Classic Platform in this region. DB Security Groups are only needed when the EC2-Classic Platform is supported. Instead, use VPC Security Groups to control access to your DB Instances. Go to the EC2 Console to view and manage your VPC Security Groups. For more information, see AWS Documentation on Supported Platforms and Using RDS in VPC.
Run Code Online (Sandbox Code Playgroud)
所以我打开了 VPC 安全组并添加了另一个安全组
类型:MySQL(3306) 协议:TCP(6) 和 Source 作为我的 IP,另一个用于我的 EC2 实例。
并将其添加到我的 RDS 安全组。
什么都没有发生。所以我查看了一个教程,他们添加了一个 CIDR/IP,但我找不到。
编辑:
我创建了另一个 RDS 实例,公共可访问性为 Yes。我已经能够成功地做到这一点,公共可访问性为是。我将源更改为我的 PC IP 以外的其他内容,但它不起作用。它给出了同样的错误。
知道了 !我创建了一个新的安全组,并在 RDS 安全组中添加了一条 mysql 规则作为新创建的组的安全组 ID。
| 归档时间: |
|
| 查看次数: |
3227 次 |
| 最近记录: |