Skip to main content

Command Palette

Search for a command to run...

How to Set Up an RDS MySQL Instance on AWS

Databases on AWS

Published
3 min read
How to Set Up an RDS MySQL Instance on AWS

Amazon RDS (Relational Database Service) makes it easy to set up, operate, and scale a relational database in the cloud. In this blog, we'll walk through the steps to create a MySQL instance using RDS.


Step 1: Sign in to AWS Management Console

  1. Go to AWS Console

  2. Search for RDS in the AWS services search bar and click on it.


Step 2: Launch a New RDS Instance

  1. Click on Create Database.

  2. Choose the Standard Create option for more control over configuration.

  3. Under Engine options, select MySQL as the database engine.


Step 3: Configure Database Settings

  1. Version: Choose the latest stable version of MySQL.

  2. Templates: Choose the use case:

    • Production

    • Dev/Test

    • Free tier (if eligible)

  3. DB Instance Identifier: Give your instance a name (e.g., mydb-instance).

  4. Master Username: Set the admin username (e.g., admin).

  5. Master Password: Set and confirm your password.


Step 4: Instance Specifications

  1. Choose the instance class (e.g., db.t3.micro for free tier).

  2. Set the storage size (start with 20 GB for testing or development).

  3. Enable storage autoscaling if needed.


Step 5: Connectivity

  1. Virtual Private Cloud (VPC): Select an existing VPC or leave as default.

  2. Subnet Group: Use the default subnet group unless you’ve created a custom one.

  3. Public Access: Choose Yes if you want to connect from outside the VPC (not recommended for production).

  4. VPC Security Group:

    • Choose an existing security group or create a new one.

    • Make sure to allow inbound traffic on port 3306 (MySQL).


Step 6: Additional Configuration

  1. Initial Database Name: Optionally specify a database to be created with the instance.

  2. Backup: Enable automatic backups and set the retention period.

  3. Monitoring: Enable enhanced monitoring if required.

  4. Maintenance: Choose automatic or manual updates during maintenance windows.


Step 7: Launch the Instance

  1. Review all settings.

  2. Click Create Database.

AWS will now provision your RDS MySQL instance. This can take a few minutes.


Step 8: Connect to the MySQL Instance

  1. Go to the RDS dashboard and click on your database instance.

  2. Find the Endpoint and Port under the Connectivity & Security section.

  3. Use a MySQL client to connect:

mysql -h your-endpoint.amazonaws.com -P 3306 -u admin -p

Final Notes

  • Make sure your IP is whitelisted in the security group to allow access.

  • Never expose production databases to public access.

  • Use parameter groups and option groups to fine-tune performance and features.


By following these steps, you can quickly set up a secure, scalable MySQL database using Amazon RDS.

Need Help?

If you're stuck or want me to guide you step-by-step, feel free to DM me.
Happy to help.