MySQL Database on AWS RDS

#How to Setup MySQL Database on AWS RDS

#Step 1: Log in to AWS Management Console and Navigate to RDS

Login to AWS Management Console and search for ‘RDS’. Once you see RDS, click on it to open the RDS service.

#Step 2: Select a Region to Create your Database Instance

Before creating a MySQL DB instance, select a region to create your MySQL database instance.

#Step 3: Click Create Database and Choose a Database Creation Method

Click on Create database. then choose Standard create.

#Step 4: Choose Engine Option

Next, we get to choose the Engine option. I am going for MySQL.

Next, I am going ahead with the Community edition and version 8.0.

#Step 5: Select Template

There are a few predefined templates to meet your use case. If you are doing it for learning purposes, it makes sense to go with the Free tier option.

As you can notice, choosing the free tier has disabled the availability and durability option which you can otherwise configure for your needs. In case you are going with dev/test or production, configure your availability and durability needs as per your requirements.

All the options above are self-explanatory so it will help you to choose what you want.

#Step 6: Configure Settings and Credentials Settings

In the sections, provide a DB identifier. In the credentials settings, provide a master password for your user, in my case admin. You can also auto-generate the password. However, I am specifying on my own.

#Step 7: Select Instance Configuration

Since we have selected the Free tier option previously, the Burstable classes that include t classes are pre-selected. Otherwise, you could choose the other options.

#Step 8: Select Storage Option

Choose storage options such as storage type, allocated storage, and autoscaling setting. For the free tier, it’s okay to keep autoscaling disabled. However, if you are enabling, make sure to provide a maximum threshold value because you won’t want your DB to grow infinitely. Do you?

#Step 9: Connectivity configurations

Provide how you would like to connect to your EC2 instance. If you want to always use an EC2 for connecting to your DB, you can choose that option. Otherwise, choose don’t connect to EC2 option. Choose a VPC and subnet group. Then select Yes for Public access as we want to connect to it from our local system. Also, select the option to Create a new security group for our MySQL DB instance. Leave the RDS proxy part as of now.

#Step 10: Database Authentication and Monitoring

There are various options available for authentication. I am going for password authentication as of now.

#Step 11: Review the Encryption and Maintenace section

Select the logs that you want to send to Cloudwatch. For example, I have chosen just the error log option. For the maintenance option, keep the below settings.

#Step 12: Hit Create Database

Scroll down and click Create database. It takes some time to set up a database. In a few minutes, you will see a success message. 😊