How To Install phpMyAdmin with Nginx on Centos

September 25, 2016

How To Install phpMyAdmin with Nginx

What is phpMyAdmin?

What is phpMyAdmin? Relational database management systems like MySQL and MariaDB are needed for a significant portion of web sites and applications. However, not all users feel comfortable administering their data from the command line.

To solve this problem, a project called phpMyAdmin was created in order to offer an alternative in the form of a web-based management interface. In this guide, we will demonstrate how to install and secure a phpMyAdmin configuration on a CentOS 7 Server. We will build this setup on top of the Nginx web server, which has a good performance profile and can handle heavy loads better than some other web servers.

How To Install phpMyAdmin with Nginx

First add EPEL yum repository your system

CentOS 6:

CentOS 7:

Install phpMyAdmin using the following command

Configure nginx to serve phpMyAdmin

In Nginx, virtual host file can be found in /etc/nginx/conf.d directory. Lets create file called “phpmyadmin.conf”.


Create required directory and enable Nginx virtual host for phpmyadmin.

Restart the services

Finally, test phpMyAdmin

Now open your browser and surf to http://youripaddress/phpMyAdmin and your phpmyadmin will ask you for user and password of your mysql installation, you can use root as user and the root mysql password, or any other mysql user/password.

Congratulation’s! You have successfully installed phpMyaAdmin with Nginx.