About Us

Citrus Consulting Services is the Consulting and the Transformation Services arm of Redington Gulf.

Sunday – Thursday: 9:00AM–6:00PM (Sales), Sunday – Saturday: 24×7 / 365 (Support) E.O#3, Ground Floor, Building 01 Dubai Internet City, P.O Box 501 761 Dubai, UAE (+971) 04 516 1500
(+966) 11 462 5323
info@citrusconsulting.com
Citrus Consulting Services
aws-rds-phpmyadmin-banner

Connecting phpMyAdmin with AWS RDS MySQL Instance

This blog explains how to install phpMyAdmin on Ubuntu 20.04 Server and connect the same with your AWS RDS MySQL instances. You can also use following method on any previous Ubuntu release.

Installing phpMyAdmin

  1. Log in to Ubuntu server with root user using SSH client.
  2. Update the operating system with the latest packages.
    sudo apt-get update
  3. Install phpMyAdmin using the command
    sudo apt-get -y install phpmyadmin
  4. On the configuration screen, select the web server that should be automatically configured. In our case select Apache2 and then press “OK” and hit Enter.
aws-rds-phpmyadmin-webserver
  1. The next screen which asks, “want to configure the database for phpMyAdmin with dbconfig-common?”. Select “Yes” and hit Enter.
aws-rds-phpmyadmin-configure
  1. On the next screen, enter the administrative MySQL root password and hit Enter.
aws-rds-phpmyadmin-administrator
  1. The final screen asks you to provide a password specifically for phpMyAdmin. This password will be used to log in. After selecting a password, hit Enter to continue.
aws-rds-phpmyadmin-password

Configuring Apache 2 & phpMyAdmin

  1. Once phpMyAdmin is installed, configure the apache.conf file by adding following line to the bottom.
    sudo vi /etc/apache2/apache2.conf
    The lines you will need to add are:
    # phpMyAdmin Configuration
    Include /etc/phpmyadmin/apache.conf
  2. Edit the configuration file for phpMyAdmin. Add AWS RDS endpoint and other server configurations
    Sudo vi /etc/phpMyAdmin/config.inc.php
$i++; 
$cfg['Servers'][$i]['host'] = 'RDS MYSQL ENDPOINT';//Enter IP address or hostname 
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli'; // Extension to connect to the database.
$cfg['Servers'][$i]['port'] = ''; //The port number of MySQL service $cfg['Servers'][$i]['user'] = ''; // Username to connect
$cfg['Servers'][$i]['password'] = ''; //Password associated with the username
  1. Restart the apache service
    sudo service apache2 restart

RDS Security Group

In RDS Security group open inbound port 3306 to give phpMyAdmin access to MySQL. You can give which IP address of the server where phpMyAdmin is installed in the Security group.

Now log in to phpMyAdmin using the password you created by visiting the URL: https:///phpmyadmin.

He is an Emerging Technology Associate Consultant with an experience of over 2 years in working with technologies like AWS. He has aided in designing and optimizing multiple AWS solutions for customers in the Middle East and Africa region enabling them in their swift and seamless Digital Transformation journey. A Certified AWS Solution architect, he is an AWS evangelist empowering customer adoption and expedited onboarding of different emerging technologies and services from varying industries and segments.

Post a Comment

two − 1 =