mysql-AWS RDS错误2003
作者:互联网
我无法连接到我的RDS实例并继续获取
ERROR 2003 (HY000): Can't connect to MySQL server on "my endpoint"
我知道出现此错误是因为公共访问权限未授权我的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.
所以我打开了VPC安全组,并添加了另一个安全组
类型:MySQL(3306)协议:TCP(6)和源作为我的IP,另一个作为我的EC2实例.
并将其添加到我的RDS安全组中.
没啥事儿.因此,我检查了一个教程,他们添加了CIDR / IP,但找不到.
编辑:
我创建了另一个RDS实例,其“公共可访问性”为“是”.
我可以使用“公共访问权限”成功完成此操作.
我将源更改为PC IP以外的其他内容,但它不起作用.它给出了相同的错误.
解决方法:
对我来说,mysql的安全组设置为特定的ip地址(在创建新的mysql RDS实例时,默认ip是pc /笔记本电脑的当前公共地址.
但是,在重新启动我的笔记本电脑后,ip发生了变化……这意味着我需要将当前笔记本电脑的公共地址添加到安全组中.入站->类型:MYSQL / Aurora,协议:TCP,端口范围:3306,源:“您的公共IP地址”
标签:amazon-web-services,amazon-ec2,amazon-rds,amazon-vpc,mysql 来源: https://codeday.me/bug/20191120/2045871.html