I am having trouble gaining access to a MySQL RDS instance.
I am trying to connect to the RDS instance from an EC2 instance. Both the RDS instance and the EC2 instance are contained within the same VPC, myVPC. I have confirmed this by checking that VPC listed under the RDS instance and the RC2 instance matches.
Most of the questions about this issue that I found revolved around security groups. Many users had this difficulty and their problem was resolved by ensuring that the VPC security group associated with the RDS instance was the same as for their EC2 instance. In my case, both instances are on the same VPC and using the same security group. Within this security group, I have a rule that allows all inbound traffic across the full range of IPs of my VPC (ex, 126.96.36.199/16). In an attempt to get this working at all, I've allowed ALL traffic accross all ports from all IP addresses for this security group. This still has not worked.
Some reading of the documentation suggests that one should ensure that your subnets are associated with the same routing table used by your VPC. I've done this by going to the route table associated all subnets within myVPC with this routing table.
I have also tried it with and without an elastic IP. I am able to connect to my EC2 instance with the elastic IP address.
I realize that this question is asked quite a lot. As of yet, I haven't come accross one whose solution has solved my problem.
Edited: Adds more details of security settings Both the ec2 instance and RDS use the same security group. Within that security group is a line that says something like
MYSQL TCP 3306 188.8.131.52/16 My CIDR range
MYSQL TCP 3306 184.108.40.206/32 My ec2 instance private IP
None of the above worked.
What DID work was under my network ACL settings I changed a line from
1 MySQL(3306) TCP(6) 3306 220.127.116.11/32 ALLOW
1 ALL TRAFFIC ALL ALL 0.0.0.0/32 ALLOW
So my problem has been worked out, but now I have another question. How can I avoid having 3306 open to all inbound connections. I may post this as a new question and link here.