Install phpMyAdmin with Nginx on CentOS 7 - Step by Step Process ?

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.

Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform phpMyAdmin related queries.

In this context, we shall look into how to install phpMyAdmin with Nginx on CentOS 7.


How to Install phpMyAdmin with Nginx on CentOS ?

Before proceeding with this Installation procedure, ensure that the following requirements are met:

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 recommend that you have access to your phpMyAdmin installation over HTTPS connections to prevent from unnecessary 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.


To begin, 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. 

Here, We are linking it to our document root directory by running:

$ 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.


How to Access phpMyAdmin ?

You can access the phpMyAdmin interface by open web browser and type your server's public IP address or domain name followed by /phpmyadmin:

https://ip_address_or_your_domain/phpmyadmin

Next, 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.


[Need urgent assistance in fixing Nginx errors? We can help you. ]

This article covers how to install phpMyAdmin with Nginx on CentOS 7 system. phpMyAdmin helps to handle the database administration of MySQL, MariaDB and Drizzle servers over the web. It basically provides the intuitive web interface and supports most of the MySQL features to create and drop databases, create/drop/alter tables, delete/edit/add columns, execute any SQL statement and to manage indexes on columns.


To install phpMyAdmin, run the following commands:

# yum install epel-release
# yum install phpmyadmin


To restart nginx, mariadb and php-fpm services, run the following commands:

# systemctl restart mariadb.service
# systemctl restart nginx.service
# systemctl restart php-fpm.service

Related Posts