AWS RDS: Amazon Relational Database Service

Divyanshu Sharma
5 min readJan 10, 2021

Integrating the rds service with WordPress

What is a database?

A database is an organized collection of data so that it can be easily accessed and managed. You can organize data into tables, rows, columns, and index it to make it easier to find relevant information. Database handlers create a database in such a way that only one set of software programs provides access to data to all the users.

What is RDS?

Amazon Relational Database Service is a distributed relational database service by Amazon Web Services. It is a web service running “in the cloud” designed to simplify the setup, operation, and scaling of a relational database for use in applications.

Basis of practical:

🔅 Create an AWS EC2 instance

🔅 Configure the instance with Apache Webserver.

🔅 Download PHP application name “WordPress”.

🔅 WordPress stores data at the backend in the MySQL Database Server. Therefore, you need to setup a MySQL server using AWS RDS service using Free Tier.

🔅 Provide the endpoint/connection string to the WordPress application to make it work.

Launching an instance in AWS CLOUD :

An instance can be termed as an operating system but running on the cloud. To launch an instance follow the given steps :

GO TO AWS CONSOLE: EC2 SERVICES
SELECT THE AMI: I HAVE CHOSEN AMAZON LINUX
INSTANCE TYPE
DO ALL TRAFFIC IN SECURITY GROUP
THE INSTANCE HAS BEEN LAUNCHED

Configure the instance with Apache webserver

Connect the instance through putty and follow the given command to setup the webserver :

INSTALL HTTPD: yum install httpd
GO TO THE DIRECTORY AND CREATE A INDEX PAGE
THE CODE INSIDE THE INDEX PAGE
RUN THE THREE COMMANDS TO ENABLE HTTPD
ACCESS THE PAGE BY PUBLIC IP OF INSTANCE

Since WordPress uses the latest version of PHP i.e PHP-7.4. Install it by the following commands in the Aws instance :

  1. sudo yum install amazon-linux-extras -y
  2. sudo amazon-linux-extras | grep php: this command shows the available versions of PHP. As is visible php7.4 exists.
  3. sudo amazon-linux-extras enable php7.4
ENABLE THE PHP VERSION
FOLLOW THE COMMAND FOR INSTALLATION
SUCCESSFULLY INSTALLED

Launching an RDS database in Aws

To launch the Rds database we use the MySql software. Follow the steps for the same :

DATABASE SERVICES
CREATE DATABASE

In your security group add an additional rule of database MySQl working on the port 3306

SUCCESSFULLY LAUNCHED DATABASE

Using WordPress :

The next step is to use WordPress. For that we follow the following steps:

  1. download and extract the software in /var/www/html
  2. Configure the wp-conf.php file
  3. Install the software
COMMAND: wget URL
Extract the file
SUCCESSFULLY EXTRACTED
CONFIGURE THE wp-conf.php file

Create a database using MySQL

Install the software using yum install mysql. Thereafter attach it to RDS using the following command

Create database using: create database data _name_ (mydb1)

This database name is added in the wp-conf.php file.

Connect to WordPress :

Once you are done with all these steps, you can connect the WordPress for installation using :

ip_of_instance/wordpress/wp-admin/install.php

You will receive the next page asking for your credentials. Fill up and start using :)

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Divyanshu Sharma
Divyanshu Sharma

Written by Divyanshu Sharma

Are you reading ? Cause I am writing :)

No responses yet

Write a response