How To Install phpMyAdmin in Linux(Ubuntu/CentOS/RHEL)

phpMyAdmin is a free and opensource web tool to manage mysql database. It provides a GUI(graphical user interface) to perform MySql administration task. Before installing phpMyAdmin you need to make sure that LAMP(Linux,Apache,Mysql,PHP) is installed on your machine.

In this tutorial we will discuss how to install phpMyAdmin on Ubuntu, CentOS and RHEL Servers

phpMyAdmin Installation Steps in Ubuntu 14.04 / 16.04

 Step:1 Open the Terminal Type the below Command

# sudo apt-get install phpmyadmin

 Step:2 You will be asked to specify Web Server , while installing the phpMyAdmin as shown below:

Select Apache Webserver while installing phpmyadmin

Step:3 Create database for phpMyAdmin. Click on ‘Yes’ , it will create the required database for phpmyadmin.

Configure phpMyAdmin

Step:4 You will also asked to specify mysql root password which you have set during Mysql installation .

mysql root password in phpmyadmin installation

Step:5 Now Set the phpmyadmin password

phpmyadmin password during installation

Retype the phpmyadmin password and select Ok.

retypr phpmyadmin password

Step:6 Now Access the phpMyAdmin , using the url :


phpmyadmin Login Screen

Use Root as a user & Password which you have set in above step and Will get the below interface after entering the credentials :

phpadmin dashboard

 PhpMyAdmin Installation Steps in CentOS 6.X / RHEL 6.X / CentOS 7.x / RHEL 7.x

To install phpMyAdmin using yum command , first we have to set EPEL(Extra Packages for Enterprise Linux) Repository.

 Step:1 Enable EPEL Repository

For 32 bit(i386) CentOS 6.X / RHEL 6.X

# rpm -ivh

For 64 bit(x86_64) CentOS 6.X / RHEL 6.X

# rpm -ivh

For CentOS 7.x / RHEL 7.x

# yum install epel-release

Step:2 Now Install phpMyAdmin Package using below Command

# yum install phpmyadmin

Step:3 Enable Remote Access

By default access of phpmyadmin is allowed from the localhost, so to allow remote access , edit the file

/etc/httpd/conf.d/phpMyAdmin.conf and replace the localhost ip( with your Network IP.

Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin

<Directory /usr/share/phpMyAdmin/>
 <IfModule mod_authz_core.c>
 # Apache 2.4
 Require ip
 Require ip ::1
 <IfModule !mod_authz_core.c>
 # Apache 2.2
 Order Deny,Allow
 Deny from All
 Allow from
 Allow from ::1

Step:4 Now Restart the Apache Service

# service httpd restart   // RHEL 6.x /CentOS 6.x
# systemctl restart httpd   //RHEL7.x / CentOS 7.x

Step:5 Now Access the phpMyAdmin from your Browser. Use MySQL username and password.


PhpMyAdmin Dashboard

Leave a Reply

Your email address will not be published. Required fields are marked *