Home / Cloud  / Amazon Services  / Install phpmyAdmin host on Amazon EC2

Install phpmyAdmin host on Amazon EC2

Do us a favor with share this post 🙂

[box ] Here we are  performing host  on  Amzaon EC2 instance , it is very simple like the other Linux box configuration .We can and configure through download  package and install it or install through yum global repositories. Here i have used remi  repository for installing package.If you want to install  Remi,  repository  on your CentOS / RHEL / Fedora Box , you can check our article  Configure Additional YUM Repositories for CentOs , Red Hat and Fedora

Here I am following  install through  yum repository.

  1. Install phpmyadmin rpm package through yum command by enabling remi repositories .


Steps to install phpmyadmin  which I have followed 


#yum --enablerepo=remi install phpMyAdmin
Resolving Dependencies  --> Running transaction check  ---> Package phpmyadmin.noarch 0: will be installed  --> Finished Dependency Resolution    Dependencies Resolved    ================================================================================   Package          Arch         Version                     Repository      Size  ================================================================================  Installing:   phpmyadmin       noarch          rpmforge       2.7 M    Transaction Summary  ================================================================================  Install       1 Package(s)    Total download size: 2.7 M  Installed size: 13 M  Is this ok [y/N]:  

2. Now navigate to the configuration file “/etc/httpd/conf.d/phpMyAdmin.conf” and allow to open phpmyadmin to access outside the local environment. Do the entry like below to phpMyadmin allow to outside your local system.

Comment the line of IP , which have loop back address and insert your IP with required parameter like below .

<Directory /usr/share/phpMyAdmin/>   AddDefaultCharset UTF-8     <IfModule mod_authz_core.c>   # Apache 2.4   Require local   </IfModule>   <IfModule !mod_authz_core.c>   # Apache 2.2   Order Deny,Allow   Deny from All  # Replace here with your IP or Network.I have replace with   Allow from    Allow from ::1    </IfModule>    </Directory>    

(3) For MySQL configuration in phpMyAdmin 
We have a RDS instance for Database , So we need to modify mysql host in config.inc. file , which will in /usr/share/phpmyadmin folder , if it will not available with that name , might be it will named as config.sample.inc. then we need to create config.inc. file and copy of content of sample file into it.

vim /etc/phpMyAdmin/config.inc.php    From    $cfg['Servers'][$i]['host'] = '';    To    $cfg['Servers'][$i]['host'] = 'xxxxxxxxxxx.rds.amazonaws.com'; //Your-RDS-Instance-Endpoint

4. Now restart your apache web server .

# service httpd restart    or    #/etc/init.d/httpd restart

5. Now access your phpMyAdmin through elastic IP of your Amazon EC2 instance like below.



You can read more article to install and secure phpmyadmin on below links.

Secure your phpMyAdmin Configuration and install latest version

Install and Configure phpMyAdmin without YUM



That’s it! at this moment ..

Do us a favor with share this post 🙂

A Linux Geek with Freelance Contributor, Server/ Cloud Administrator having 6+ Years experience in Open Source and Cloud Technologies.

Review overview

Sorry, the comment form is closed at this time.