Go to ec2 -> launch instance -> rhel -> launch -> login
#yum install -y mariadb*
#yum update -y
#systemctl restart mariadb
#systemctl enable mariadb
2. RDS
Create a security group -> SG name
(RDSSecurity) ->Description (RDSSecurity) -> VPC
(default) ->add rule -> mysql/aurora (3306) ->add
source (copy the SG id of ec2 instance and paste it
to source, because we are going to allow only the
connection from ec2) -> Go to RDS -> select
MariaDB -> dev/test -> DB instance class (t2.micro)
-> multi-AZ deployment (no) -> storage type (ssd) ->
allocated storage (5G, max 6TB) -> DB instance
identifier (nirmal, give a unique name to identify DB)
-> master username (nirmal) -> master password
(pragathi, give any 8 character) -> confirm password
-> VPC (default) -> subnet (default) -> publicly
accessible (no, if set to yes the RDS will have a
public ip so anyone can access from outside -> VPC
SG (RDSSecurity, one that you created) -> DB Name
(MariaDB) -> backup retention period (7 days, max
35days, maximum no.of days the snapshot should
be retained) -> Backup window (default, specifying
at wot time the backup should be done) -> Auto
minor version upgrade (yes) -> Launch DB instance.
3.Login to EC2 and connect to RDS
Check mariadb is working fine or not->
#mysql -u root -p
If working
#mysql -h (endpoint, without port no) -P 3306 -u
(username) -p
(check whether connection is happening to
RDS or not, then show some basic MariaDB cmd)
4.Restoring DB
if we restore its going to recreate a new instance with a new endpoint.
Select action -> go to pointin time -> use
latest restorable time (latest) or custom restore
time -> launch