It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In RegisterIt looks like you're new here. If you want to get involved, click one of these buttons!
phpMyAdmin is a popular free and open-source tool written in PHP for administering MySQL and MariaDB using a browser. The web interface makes working with databases easier and faster than through the console.
In this guide, we will install phpMyAdmin on CentOS 7.
CentOS 7 reached the EOL June 30, 2024:
https://blog.centos.org/2023/04/end-dates-are-coming-for-centos-stream-8-and-centos-linux-7/
Because of this, you may encounter some repository issues. We recommend that you reinstall another OS that has not yet reached EOL.
If you are using CentOS 7 and encounter a mirror issue, please check out this guide to resolve the problem.
Before you install phpMyAdmin, make sure the following software is installed on your server:
Install EPEL release by running the following command:
yum install epel-release
The EPEL repository contains additional packages, including phpMyAdmin. So now you can proceed with the installation of phpMyAdmin.
To install phpMyAdmin, run this command:
yum install phpmyadmin
To connect phpMyAdmin remotely, edit the configuration file. This will allow access from specific IP addresses.
To open the phpMyAdmin configuration file, run this command:
vi /etc/httpd/conf.d/phpMyAdmin.conf
Inside file, find these lines:
You need 'require ip' and 'allow' lines:
Require ip 127.0.0.1
and
Allow from 127.0.0.1
Both lines ('require ip' and 'allow') are repeated twice.
You should modify them and specify your workstation IP address (write the actual IP instead of "your_ip").
require ip your_ip
...
allow from your_ip
Then save the file and exit (pres "Esc", then type :wq and click "Enter").
After you modified the configurations file, make sure to restart Apache:
systemctl restart httpd
To access phpMyAdmin, in your web browser enter your server IP address and then /phpmyadmin:
server_ip/phpmyadmin
If everything is correct, you will see the phpMyAdmin login page where you can enter your MySQL user credentials:
You're all set. Now, you can work with your databases via phpMyAdmin.
Please note. If you still can't access the phpMyAdmin page, be sure to double-check the configuration file again. You may have entered something incorrectly inside this file, or you may not have modified all the required lines.