Amazon Web Service currently offers one-year-free trial of their services and I am experimenting with their database service. I set up a MySQL server database. However, after the service was ready, I found out that, AWS doesn”t provide GUI to access the database. I always use phpMyAdmin to manage MySQL database because it is easy and thinking whether I could use phpMyAdmin to manage my AWS database or not. After a quick research on the Internet, I found out that it is possible. How could we do that?

First, we need to install phpMyAdmin. The good thing about phpMyAdmin is it is a web application, doesn”t matter the type of Operating System you have as long as it has web server to host phpMyAdmin you are set. Second you need to modify phpMyAdmin configuration file by adding few lines on it. The file that you need to modify is config.inc.php. Different OS has different location for this file. I used Ubuntu 14.04 and Windows 7 XAMPP.

  • Ubuntu 14.04 –> /etc/phpmyadmin
  • Windows 7 XAMPP –> \xampp\phpMyAdmin (relative to your xampp root document by default it is in C:)

Add these following lines inside the php tag of config.inc.php

1
2
3
4
5
6
7
8
9
/*You need the following line define the next server configuration.
If you find this at the end of your configuration you don"t need to add it*/
$i ;
/*This line is optional. It is used to name your connection*/
$cfg["Servers"][$i]["verbose"] = "Amazon Web Service";
/*Defining authentication type*/
$cfg["Servers"][$i]["auth_type"] = "HTTP";
/*Fill in the host with your AWS instance endpoint information*/
$cfg["Servers"][$i]["host"] = "xxxxxxx.cnbvmxbgsmon.us-west-2.rds.amazonaws.com";
Once you added those lines, save the changes and you are all set. Now run your phpMyAdmin page from your browser and you will start seeing drop down menu of server options you wish to connect to like the figure below.