with Amazon RDS
In this tutorial, you will learn how to create an environment to run your MariaDB database (we call this environment an instance), connect to the database, and delete the DB instance. We will do this using Amazon Relational Database Service (Amazon RDS) and everything done in this tutorial is free tier eligible.
Manage Your AWS Resources
Sign in to the ConsoleWhen you click here, the AWS management console will open in a new browser window, so you can keep this step-by-step guide open. When this screen loads, find RDS under Database and click to open the Amazon RDS Console.
In this step, we will use Amazon RDS to create a MariaDB instance with a db.t2.micro DB instance class, 20 GB of storage, and automated backups enabled with a retention period of one day. As a reminder, all of this is free tier eligible.
a. In the top right corner of the Amazon RDS console, select the Region in which you want to create the DB instance.
Note: AWS Cloud resources are housed in highly available data center facilities in different areas of the world. Each Region contains multiple distinct locations called Availability Zones. You have the ability to choose which Region to host your Amazon RDS activity in.
f. Your DB Instance is now being created. Click View Your DB Instance.
Click Instances to track the status of your DB instance launch. When the status changes from creating to available, the DB instance is ready for usage.
Note: It can take several minutes for the new DB instance to become available. Feel free to move on to the next step as you wait.
After the database instance creation is complete and the status changes to available, you can connect to a database on the DB instance using any standard SQL client. As MariaDB is compatible with MySQL, we will download MySQL Workbench, a popular MySQL client.
a. Go to the Download MySQL Workbench page to download and install MySQL Workbench. For more information on using MySQL, see the MySQL Documentation.
Note: Remember to use MySQL Workbench from the same device from which you created the DB Instance. The security group your database is placed in is configured to allow connection only from the device from which you created the DB instance.
In this step, we will connect to the database that you created using MySQL Workbench.
b. A dialog box appears. Enter the following:
- Hostname: You can find your hostname on the Amazon RDS console as shown in the screenshot to the right. Enter or paste the hostname of the DB Instance running the MariaDB database engine. For example, the hostname name could be: myrdstest.cg034hpkmmjt.us-east-1.rds.amazonaws.com.
- Port: The default value should be 3306.
- Username: Type in the username you created for the Amazon RDS database. Our example was 'masterUsername.'
- Password: Click Store in Vault and enter the password that you used when creating the Amazon RDS database.
Click OK
You can easily delete the MariaDB DB Instance from the Amazon RDS console. It is a best practice to delete instances that you are no longer using so that you don’t keep getting charged for them.
You have created, connected to, and deleted a MariaDB Database Instance with Amazon RDS. Amazon RDS makes it easy to set up, operate, and scale a relational database in the cloud. It provides cost-efficient and resizable capacity while managing time-consuming database administration tasks, freeing you up to focus on your applications and business.
Now that you have learned to create and connect to a MariaDB Database through Amazon RDS, you can progress to the next tutorial where you will learn to restore a DB Instance from a DB Snapshot.