Not being able to connect to AWS RDS MySQL database?
AWS has a free tier offering for an year for certain services in limit. One of such services is RDS (Relational Database System) MySQL database.
The AWS Free Tier is a wonderful offering who all the students who want to learn, for small self-learning projects and even for business professionals to try their ideas.
Setting up a database over AWS RDS is a simple process which takes no more than 10 minutes. There are also options to choose from a variety of database options as per your needs. These are perfect to let us learn and use for small projects. I personally use this to learn SQL and functions of the different databases.
You can use the following page to setup an AWS RDS Database:https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_GettingStarted.CreatingConnecting.MySQL.html
Note: To use a free tier service you will have to register for an AWS account using your email address, telephone number and credit card number. They will deduct a small amount and then credit it back in a 2-3 days.
Once you have created a database, there are still chances that you might not be able to access the database from outside. I have faced this issues and I believe several others have faced it as well. There are two possible causes –
- Allowing Public Access to the Database
While creating the database, there is a part of the form where we can select to allow Public Access to the database. Make sure this option is selected and the Public Access is enabled.

2. Allowing IP access to the VPC
If you have enabled the Public Access, and even then you are not able to access the database, then you might not have made changes to the VPC security group.
To change the settings, open the database from the RDS console. You will see the configurations mentioned. Click on the name of security group and then check the inbound rules. The inbound rules should either allow all IPs (as below) or your specific IP.
