phpMyAdmin is a free, open source and web interface based database management tool for managing MySQL and MariaDB. You can manage MySQL databases, user accounts and privileges, import and export data and much more using phpmyadmin interface. This guide will help you to install phpMyAdmin with Nginx on CentOS 7.
- Logged in on CentOS server as non-root user account with sudo privileges.
- Ensure that LEMP (Linux, Nginx, MySQL and PHP) stack is installed on your CentOS system.
We strongly recommended to access your phpMyAdmin installation over HTTPS connections to prevent from unecessary attacks. If your domain is not secure with an SSL/TLS certificate, you can Follow this guide to Secure Nginx with Let’s Encrypt on CentOS.
Installing phpMyAdmin with Nginx on CentOS
At first, We will enable EPEL repository to install phpMyAdmin from EPEL repository. phpMyAdmin package is not available on CentOS 7 core repositories. Run below command:
sudo yum install epel-release
Once EPEL repository enabled you can install the phpMyAdmin and it’s dependencies with the below command:
sudo yum install phpmyadmin
Wait until installation finished. After that we will create a symbolic link to access phpMyAdmin interface from installation files. We are linking it to our document root directory by typing:
sudo ln -s /usr/share/phpMyAdmin /usr/share/nginx/html
Next, We should also need to restart our PHP processor to take effects:
sudo systemctl restart php-fpm
phpMyAdmin installation is completed and now you can open it.
You can access the phpMyAdmin interface by open web browser and type your server’s public IP address or domain name followed by /phpmyadmin:
Log in to the interface with the administrative username and password which you created on previous step and hit on Go button.
When you log in, you’ll see the phpMyAdmin user interface, which will look something like this:
Finally, you have successfully installed phpMyAdmin with Nginx on CentOS 7 system. If you have any questions or suggestions feel free to leave a comment below.