unknown mysql server_Unknown MySQL server host

Please pay attention with AWS security groups:

In my case I can connect to RDS from my computer throw Telnet and

I can connect throw Mysql Workbench also but I cant connect from

my EC2 instance that is within the same VPC as the RDS.

The solution was:

1. I have created a security group (exampl1) for RDS and assigned to it.

2. I have created a security group (exampl2) for EC2 and assigned to it.

and I have assigned the RDS security group (exampl1) to the EC2 too. << this saves me.

Info: If your EC2 has assigned 2 or more security groups, then in the RDS security group inbound source has to create rules as many security groups has your EC2 assigned.

Amazon docs says:

The EC2 instance in the VPC shares the same VPC security group with the DB instance.

http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.RDSSecurityGroups.html

I spent all day searching docs.

I hope this help you.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值