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.

image.png

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.

image.png

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.

image.png

Above is how the connection page should look like once the database is up and running.

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.

Navigate to the VPC Security group by following these steps - Step 1. Click on VPC Security Groups link

image.png

Step 2. Click on Inbound Traffic

image.png

Make sure you add the following rules -

  1. Type - All Traffic and Source - Your IP Address
  2. Type - All Traffic and Source - All IPv4 (Optional)
  3. Type - All Traffic and Source - All IPv6 (Optional)

If should look like this -

image.png

Test Connection

You can use any Database Manager or Programming language to validate the connection. Bellow, we are using DBeaver

image.png

And that's it! For more articles like this, you can follow me at ishmeet.dev

Happy Learning!🤖