Creating and Accessing MariaDB Database with EC2

Creating and Accessing MariaDB Database with EC2

RDS for MariaDB is a powerful and flexible managed database service that enables you to easily run and scale MariaDB databases in the cloud while reducing the operational overhead and cost associated with running a database infrastructure on your own.

General setup

Search for the RDS in AWS

Select Standard Create because with Standard we have more customization options

Select MariaDB Engine

Go with the Free Tier but whenever we are working for any client we won't go with the Free tier

In settings enter the name and username

Enter your password

In Instance configuration, automatically Burstable class come with Free Tier

Make configuration in the Storage type

In Connectivity, select these options

Make it public accessible

Additional configuration

I disable auto backups for now

I deselect encryption

Rest things are default

This process will take a few minutes to get launched

Making Connection

Launching EC2 Instance

I am launching an EC2 Instance to run connect with my MariaDB database

Installing MySQL in the EC2

sudo apt update
sudo apt install mysql-server -y

Installation of Mysql is mandatory

First, you should connect with MySql to check current databases

sudo mysql -u root -p
show databases;

Connecting with our MariaDB

sudo mysql -u (end point of the RDS database) -u admin -p

After entering the command it will ask you to enter the password which you've created in the RDS section.

Done you can check initialdbsagar is created by me in RDS