In this tutorial, we will show you how to install and configuration of PHPMyAdmin on Nginx web server on your CentOS 6 server. For those of you who didn’t know, PHPMyAdmin is the web-based administration tool for managing the MySQL, MariaDB and Drizzle servers, it helps in performing databases activities such as creating, deleting, querying, tables, columns, relations, indexes, users, permissions, etc. This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS and assume and that you already have Nginx installed on the system. You will also need PHP-fpm to have Phpmyadmin working on Nginx.
Install phpMyAdmin on Nginx
Step 1. First, add EPEL yum repository your system.
Step 2. Install phpMyAdmin using the following command.
Step 3. Configure Nginx to serve phpMyAdmin.
In Nginx, virtual host file can be found in
/etc/nginx/conf.d directory. Let’s create a file called “phpmyadmin.conf”.
## Images and static content is treated different
Create the required directory and enable Nginx virtual host for PHPMyAdmin.
Step 4. Restart the services.
Step 5. 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.
Congratulations! You have successfully installed PHPMyAdmin with Nginx. Thanks for using this tutorial for installing PHPMyAdmin on Nginx web server on Linux system. For additional help or useful information, we recommend you to check the official PHPMyAdmin web site.