best web hosting

How to install phpMyAdmin on Centos 7?

Did you install mysql centos 7 on your server and finding it difficult to manage your database using MySQL command prompt? Do you want a web interface phpMyAdmin Linux to manage your databases & tables? If yes, then don’t worry I will guide you on How to install phpMyAdmin Centos 7?

I will try to keep this guide as simple as possible. At the end of this guide, you will be able to install phpMyAdmin Centos 7 on your server.


phpMyAdmin was created with the purpose to ease the operations required to manage databases, It is a web interface where you can easily add, update and delete the databases, it’s tables and table contents. Keep a note that phpMyAdmin is not a database it is just a web interface where you can manage your databases, in this case, the database is MySQL/ MariaDB. Check out the features.

In this guide, we will discuss how to install and secure phpMyAdmin on CentOS 7. Before proceeding with actual installation process kindly read the prerequisites section carefully to avoid misconfiguration of your server.


Before you proceed further with this guide, you need to make sure you have completed the below-given points.

  • I assume that you have a server installed with CentOS 7 with a user having root privileges.
  • Before you start the installation of phpMyAdmin on the server make sure you have installed LAMP stack i.e Apache, MySQL/MariaDB, and PHP on the server, if not then read and follow this guide first How to install LAMP on Centos 7?
  • Install MySQL Centos 7 or MariaDB, the choice is yours. We have installed MariaDB server in our previous guide How to install LAMP on Centos 7?

It is important to make sure you have completed the steps mentioned in a prerequisite section before your install phpMyAdmin.

Install phpMyAdmin Centos 7

To install phpMyAdmin CentOS 7, we will pull the phpMyAdmin package from the repository.

phpMyAdmin package is not available in CentOS 7’s default repository. So we will download the package from the EPEL (Extra Package for Enterprise Linux).

To install phpMyAdmin from EPEL repository, we need to download first the EPEL package on our server. In some of the latest CentOS 7 releases, EPEL packages are already installed.

1) Install EPEL Repository

sudo yum install epel-release

Now that the EPEL package is installed and configured on our server, we are ready to install phpMyAdmin package on our server.

2) Install phpMyAdmin

sudo yum install phpmyadmin

This will install phpMyAdmin package on your server. But to make it work properly we need to do some modifications in the phpMyAdmin configuration file.

3) Find out IP address

Before doing some configurations, we need to find out the current IP address of our computer. This is the same computer from where we are going to access phpMyAdmin.

Find out IP address from any of the below-given websites:

4) Allow IP address to access server phpMyAdmin

By default, the server will not allow you to access the phpMyAdmin outside the server. But we are accessing the server remotely so we need to add our IP address to a configuration file.

Open the config file in text editor.

sudo nano /etc/httpd/conf.d/phpMyAdmin.conf

In this Apache Virtual Host file, you will see the lines Require ip and Allow from Change the IP address with the IP you got in Step 3. Change it for every occurrence in the file.

Require ip your_computer_ip_address
Allow from your_computer_ip_address
Require ip your_computer_ip_address
Allow from your_computer_ip_address

Save the file and exit. We have just made a configuration to allow phpMyAdmin access from the local computer.

5) Restart the Apache

sudo systemctl restart httpd

We just made our phpMyAdmin operational and you can check it by accessing it in the browser.


You will see the login page.
install phpmyadmin centos 7

Login password is the same password you have used while installing MySQL/MariaDB


As you have installed phpMyAdmin on CentOS 7 server, you will now be able to access your databases and tables using the Web Interface. You can easily perform all database SQL operations like Select, Update, Delete with the easy to use Web Interface. Most of the web artisans prefer phpMyAdmin to manage their databases and tables.

Kindly let me know if you face any issues while following my step by step guide on How to install phpMyAdmin on CentOS 7? You can comment your problems below and I will try to resolve your query as soon as possible. If you like this article don’t forget to share this with your friends & colleagues. If you find my articles are helpful then do subscribe to our newsletters.

Thank you for reading.

best web hosting

Add Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.