Detailed Guide to Amazon Relational Database Service (RDS) Database Setup With phpMyAdmin

April 22, 2022 | Comments(0) |

TABLE OF CONTENT

1. Introduction to AWS RDS
2. Why is this setup needed?
3. Advantages of phpMyAdmin
4. Prerequisites
5. Architectural Flow Diagram
6. Steps to Setup phpMyAdmin panel on RDS Database
7. Conclusion
8. About CloudThat
9. FAQs

1. Introduction to AWS RDS:

Businesses of all sizes and shapes may benefit from Amazon Web Service’s wide range of goods and services. Amazon RDS is one of Amazon’s most popular and notable services (Relational Database Service). Now that this relational database service is available, software programmers will find it easier to set up, operate, and scale a relational database in the Amazon Cloud. The most typical administrative activities are automatically assisted using hardware support, setup functionality, patching, and other database backup and functions. In addition, businesses can extend storage and other computational resources with AWS RDS with a single API call.

2. Why is this setup needed?

Many third-party tools such as MySQL Workbench, pgAdmin, and dB Forge Studio are available. But phpMyAdmin is the most widely used application for managing database operations by young developers who is very new to database management. phpMyAdmin is the best solution we get over the internet, which is easy to set up and use.

It can be installed on any OS flavor, such as Ubuntu, RHEL, Amazon Linux, or Windows. It is very compatible with most of the OS available on the market.

Now, let us talk about some of the advantages that phpMyAdmin offers.

3. Advantages of phpMyAdmin

  • phpMyAdmin can run on any servers containing any OS as it has a web browser
  • We can manage all kinds of database operations using the graphical interface of phpMyAdmin, which makes it easier to use rather than the MYSQL command line editor
  • Using this graphical interface, we can execute complex queries, create, and edit functions, triggers, and events of phpMyAdmin
  • It also allows us to export the database backup in different formats like XML, CSV, PDF, OpenDocument Text, Excel, Word, Spreadsheet, etc.

4. Prerequisites

  • Web server – Apache, Nginx, IIS
  • PHP
  • Database – MySQL, MariaDB
  • Web Browser

We have understood phpMyAdmin, and it’s working. Let us take a scenario where you have an RDS database containing MYSQL DB hosted in a private subnet. It is not publicly assessable and can only be accessible by AWS EC2 hosted on a public subnet. We want to access and manage it in my database with phpMyAdmin using Web Browser.

5. Architectural Flow Diagram

RDS Setup

6. Steps to Setup phpMyAdmin panel on RDS Database

  1. Setup Of RDS Database
    a. Create an RDS database with public access disabled, it should not be set to public assessable
    RDS Setup
    b. Modify the security group for the RDS database and make sure that it has inbound EC2 hosted in the public subnet
    RDS setup
    Here, I have specified my security group on EC2 hosted in a public subnet in my RDS DB security group Inbound rule. The database can allow any request coming from any instance that uses the same security group.
  2. Installing phpMyAdmin in EC2 (Ubuntu 18.04)
    a. SSH into your EC2
    b. sudo su
    c. apt-get update
    d. apt-get upgrade -y
    e. apt-get install apache2 -y
    f. apt-get install mysql-server
    g. mysql_secure_installation
    h. apt install php libapache2-mod-php php-mysql
    I. apt install phpmyadmin php-mbstring php-gettext
    When the prompt appears, “apache2” is highlighted, but not selected. To select Apache, hit SPACE, TAB, then ENTER
    RDS Setup
    j. Enter any password to setup phpMyAdmin
    RDS Setup
    RDS Setup
    k. phepenmod mbstring
    l. systemctl restart apache2
    m. Add these lines
    nano /etc/apache2/sites-enabled/000-default.conf
    Include /etc/phpmyadmin/apache.conf
    RDS setup
    n. service apache2 restart
    o. nano /etc/phpmyadmin/config.inc.php
    p. Add these lines

    q. Fill in all the details like host, user, password
    RDS Setup
    r. 
    Now copy the IP and type in the URl with /phpMyAdmin

    Example – 65.0.81.55/phpMyAdmin and pass Username and Password with Server choice as RDS endpoint
    RDS Setup
    s. You can restrict and make your website secure by enabling restrictions in .htaccess file to setup that click here – Secure your phpMyAdmin WebsiteThis is how you can connect your RDS database with phpMyAdmin in Ubuntu 18.04

7. Conclusion

phpMyAdmin provides a GUI and helps to manage our MySQL database easily it has all the features available to manage your database and the cherry on top is the AWS RDS database, which is adding extra security functionality to your important data stored in a database. You can use this method to provide a graphical user interface to your data stored inside the RDS database to your end-user in the browser window.

Amazon RDS Multi-AZ deployments are appropriate for production database workloads, as data is replicated synchronously to a standby instance in different Availability Zone. Learn more about Readable Standby Instances In Multi-AZ Deployments By Amazon RDS in this blog. 

8. About CloudThat

As a pioneer in the Cloud consulting realm, CloudThat is AWS (Amazon Web Services) Advanced Consulting Partner, AWS authorized Training Partner, Microsoft Gold Partner, and Winner of the Microsoft Asia Superstar Campaign for India: 2021. Our team has designed and delivered various Disaster Recovery strategies to our customers.

We are on a mission to build a robust cloud computing ecosystem by disseminating knowledge on technological intricacies within the cloud space. Our blogs, webinars, case studies, and white papers enable all the stakeholders in the cloud computing sphere to advance in their businesses.

To get started, go through our Expert Advisory page and Managed Services Package that is CloudThat’s offerings. Then, you can quickly get in touch with our highly accomplished team of experts to carry out your migration needs. Feel free to drop a comment or any queries that you have about Audio-to-text Automated Conversion, AWS Transcribe, or any other AWS services we will get back to you quickly.

9. FAQs

  1. What are the other options to access the RDS Databases?
    1. You can use Normal SQL queries, PSQL queries, PostgreSQL queries
    2. You can use pgAdmin, MySQL Workbench tools to access the database
  2. What are the other types of databases does AWS provide?
    AWS Provides various kinds of databases;

    1. Amazon Aurora
    2. Amazon Redshift
    3. Amazon DynamoDB
    4. Amazon Elastic Cache (In-Memory Database)
    5. Amazon Neptune (Graph Database)

Leave a Reply