I set up RDS (mysql) with Elastic Beanstalk/EC2 on AWS for my PHP API.
The API is reachable through http and https, but it seems the connection to the DB is having troubles, as I'm getting error:
"SQLSTATE[HY000]  Connection timed out","error_data":
What I've checked:
- My PHP app is load balanced, with a SSL cert attached, and served through https through cloudfront. The security group assigned to this EC2 instance is the same as I'm using for RDS, with inbound rules that accept http connection (it's also attached to the default RDS security group which allows it to be in
I can connect to the DB instance through my credentials in sequel pro
I've double checked my elastic beanstalk
envvariables, which are the same as I used to log in successfully to sequel pro on the server
I checked the server logs and am not getting much more detail about why I cannot connect.
EDIT: added inbound settings for MYSQL