AWS RDS public access
By default, even you have set "Public accessibility" to "Yes" during the setup of RDS, the "Security Group" still not allowing the port 3306 yet.
Therefore you have to click on the Security Group of the RDS, then add a Rule to allow 3306 from anywhere IP.
Here is the reference setting. But here I have to warn you first, this public accessibility would expose your database to the internet. Please do at your own risk.
Two things to check:
Ensure that the RDS instance has the publicly accessible attribute set so that it is assigned a public address
Also according to the AWS RDS docs, "If you want your DB instance in the VPC to be publicly accessible, you must enable the VPC attributes DNS hostnames and DNS resolution."
Also, check that the IP that your RDS instance hostname resolves to is a public IP address.
Unable to connect to my publicly accessible RDS as well following https://aws.amazon.com/premiumsupport/knowledge-center/rds-connectivity-instance-subnet-vpc/.
It turns out one of my subnet route table does not have route record to public 0.0.0.0/0, when added it works.
As per new AWS RDS UI. Follow Following steps.
- Open the Amazon RDS console.
- Choose Databases from the navigation pane, and then select the DB instance.
- Choose Modify.
- Connectivity
Additionally[important]: inbound and outbound policy update with PORT and IPs