How to deploy a MySQL database using AWS RDS — a simple way!
Database deployment should be easy and straight forward but after spinning up a couple of databases on AWS I found that not to be the case. Here I bring a simple guide that will save a lot of your time in DB deployment and issue identification/resolution.
Let’s get into it!
Loading RDS and selecting MySQL
Navigate to RDS from the services page and choose MySQL as your database.
Select a proper template and provide database credential
For the demo, we are going to utilize the free tier template which is going to limit the resource to 1vCPU and 1vRAM. You can always choose other templates as per your requirement.
Please note the credentials as there is no way of retrieving them afterward.
Once everything is set hit on create and wait for a couple of minutes for the deployment to complete.
Modify VPC Inbound Traffic rules.
Our database is now configured to be accessed publically but now we need to allow the VPCOpen VPC Security Group in the Connectivity section of your database details.
Make sure you add the following rules —
- Type — All Traffic and Source — Your IP Address
- Type — All Traffic and Source — All IPv4 (Optional)
- Type — All Traffic and Source — All IPv6 (Optional)
If should look like this —
Test Connection
You can use any DB Manager or Programming language to validate the connection. Bellow, we are using DBeaver
And that’s it! For more articles like this, you can follow me at https://ishmeet.dev
Happy Learning!🤖