In this tutorial we’ll learn how to install phpMyAdmin on CentOS 7. We will also install and configure its prerequisites. phpMyAdmin is one of the most popular and widely used web-based database management tools. It’s a free and open source PHP application that allows the users to manage single or multiple SQL database servers locally or on a remote server using a web browser (GUI). phpMyAdmin is very handy and useful. We can easily create, rename, delete and edit databases, tables or fields, execute SQL commands, import and export tables, create and modify users, etc., all via an easy-to-use GUI.
I recommend to use a minimal CentOS server setup as a basis for the tutorial, that can be a virtual or a root server image with an CentOS 7 minimal install from a web hosting company or you use our minimal server tutorial to install a server from scratch.
Install phpMyAdmin on CentOS 7
Step 1. First, ensure your system is fully up-to-date by running the following:
yum -y update yum -y install epel-release
Step 2. Installing LAMP on Ubuntu 16.04.
You should check out this LAMP stack install tutorial for CentOS 7, if you haven’t installed LAMP yet.
Step 3. Installing phpMyAdmin on CentOS 7.
Now you can install the phpMyAdmin package with the command below:
yum install phpmyadmin
Step 4. Basic Configuration for phpMyAdmin.
To secure phpMyAdmin we should lock down access to a specific IP address. When the phpMyAdmin package is installed, an Apache Virtual Host file is added to configure web access:
By default, the configuration for phpMyAdmin only allows access from the server on which it is installed. Find IP address that will be connecting to phpMyAdmin remotely:
. . . Require ip your_workstation_IP_address . . . Allow from your_workstation_IP_address . . . Require ip your_workstation_IP_address . . . Allow from your_workstation_IP_address . . .
When you are finished, restart the Apache web server to implement your modifications by typing:
systemctl restart httpd.service
Step 5. Access phpMyAdmin dashboard.
Now, you can access the phpMyAdmin dashboard by navigating to http://server-ip-address/phpmyadmin/ from your browser. You should see the following screen. Enter the MariaDB/MySQL ‘root’ user name and its password.
Congratulation’s! You have successfully install and configure phpMyAdmin on your CentOS 7 server. Thanks for using this tutorial installing phpMyAdmin on CentOS 7 system.