Set up MySQL database on Amazon AWS Cloud

Business Benefits

Create a free database to learn and grow your skills on MySQL.

Create an account on Amazon AWS.

Complete the sign in for the AWS account. Note that AWS will request a credit card info, but will not charge for any services. AWS provides many free tier products and MySQL RDS is one of the services that can be accessed for free.

Click on the Services tab as shown below, or search for RDS in the search box and click on RDS under database.

This will create a free tier MySQL RDS on AWS on which you can learn and access the database.

Click on the Databases menu on the left side, and click on Create database. Choose Easy create, MySQL and Free tier.

Set up a database identifier that can be used by other applications which need to connect to the database, including allowing you to access it from MySQL Workbench.

Choose the database instance name and master username. Either select Auto generate a password or enter your master password in the Master password and Confirm password fields.

Expand View default settings for Easy create and review the settings.

Click on Create database.

Set up access to the database from your local IP address so you can access the database from MySQL Workbench on your computer.

Amazon creates a default VPC (Virtual Private Network) that will be used to access the MySQL database from within the VPC only. To access the database from your local PC from home or office using MySQL Workbench, add your IP address to the security group.

After the database has been created, select the database name from the list of databases and click on the VPC security group listed under Security.

Click on Inbound rules and add your local/home IP address.

Add a new rule for MySQL/Aurora for both inbound and outbound rules.

Write down the credentials of the MySQL database from the database configuration dashboard on AWS RDS console.

From the database identifers, the following are the connection strings to connect to external applications or access your database from MySQL workbench.

View the configuration by clicking on the Configuration tab under the database.

Note: In the screenshot above, DB name is empty because we chose the Easy create option. By default, AWS doesn’t provide a db name - by default, it’s set to sys. However, you can create a database (schema) by connecting your database instance in MySQL workbench.

Using the database credentials you wrote down, set up and access AWS RDS from MySQL Workbench on your computer.

Use the delete option on the AWS RDS console to delete the MySQL database if it’s no longer needed after training, so that you don’t incur overtime charges from AWS.

AWS RDS Free tier provides up to 20GB of storage and 750 hours of uptime (read/write) for your free tier. To delete the database:

  1. Access the RDS from Databases console.
  2. Click on Actions > Delete.
  3. Enter Delete me and click Delete.

If you would like to keep a snapshot of your database, choose the Take snapshot option before deleting. However, note that AWS will charge for the storage of the snapshot.

Last edited by @hesh_fekry 2023-11-14T15:10:31Z