How To Install PhpMyAdmin On CentOS

phpMyadmin is an open source application to manage the administration of MySQL and MariaDB over the web. Using this application, we can easier to manage and handle the databases than via command line. This article explains how to install phpmyadmin on CentOS 7 and CentOS 6 using web server apache and assume that we installed database like MySQL or MariaDB on the server.

On CentOS 7

1. Add the EPEL repository
Install Extra Packages for Enterprise Linux (EPEL) repository using this command:

2. Install phpMyAdmin
Install phpMyAdmin using this command:

3. Configuring phpMyAdmin file
By default, the configuration for phpMyAdmin only allows access from the server on which it is installed and we can not access the application via a web browser in another host. That is why we must configure phpMyAdmin.conf file in /etc/httpd/conf.d/phpMyAdmin.conf to access phpmyadmin. Before we configure it, we must know about the version of Apache. Use this command to display version of Apache:

Usually on CentOS 7 use web server apache version 2.4 so, open the file and change in Apache 2.4 section if you want to access phpmyadmin from everywhere:

to


But if you want to access it from certain IP like only IP 192.168.56.40 can access phpmyadmin, we must change it to Require ip 192.168.56.40/32.
4. Restart web server
After that, restart webserver

and go to web browser and type:

and there will be display like this:

Type username and password of your database and there will be display like this:

On CentOS 6

1. Add the EPEL repository
Install Extra Packages for Enterprise Linux (EPEL) repository using this command:

2. Install phpMyAdmin
Install phpMyAdmin using this command:

3. Configuring phpMyAdmin file
By default, the configuration for phpMyAdmin only allows access from the server on which it is installed and we can not access the application via a web browser in another host. That is why we must configure phpMyAdmin.conf file in /etc/httpd/conf.d/phpMyAdmin.conf to access phpmyadmin. Before we configure it, we must know about the version of apache. Use this command to display version of Apache:

Usually on CentOS 6 use web server apache version 2.2 so, open the file and change in Apache 2.2 section if you want to access phpmyadmin from everywhere:

to

install phpmyadmin
But if you want to access it from certain IP like only IP 192.168.56.40 can access phpmyadmin, we must change it to Require ip 192.168.56.40/32.
4. Restart web server
After that, restart web server:

and go to web browser and type:

and there will be display like this:

Type username and password of your database and there will be display like this:

References:
phpmyadmin.net
liquidweb.com
tecmint.com

Leave a Reply

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