I am attempting to query a MySQL database from a java program on EC2. My database is stored on Amazon Web Services (AWS) RDS.
When I test my java program from my local tomcat server, I successfully query the RDS database. However, when I query my RDS database from my EC2 instance, I fail to connect.
In my attempts to solve this problem, I investigated my security settings. I've set up an RDS security group associated with my EC2 Security group that is associated with my instance. In my EC2 security group I've enabled all types of inbound traffic to all ports.
Other answers to similar questions suggest that setting up the RDS security groups to accept connections from the EC2 instance is the resolution to this problem. However, I have seemingly done this, yet cannot connect from my EC2 instance (but can from my local machine).
Am I overlooking something?