How To Install and Secure phpMyAdmin with Nginx on a CentOS 8

Posted July 1, 2020 5.3k views
CentOS 8

How To Install and Secure phpMyAdmin with Nginx on a CentOS 8.2 server

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Hello, @muradhuseynli1234

The process will be actually almost the same as the one for the CentOS 7 droplet. We already have an article on how to install and secure the phpMyAdmin installation on LEMP stack server.

What you can do is to first follow our tutorial on how to set Linux, Nginx, MySQL, PHP (LEMP) Stack on CentOS 8 - as this part of the prerequisites

Also you need to complete the initial Server Setup Guide for CentOS 8 -

Once this is done you can go ahead with the Step One — Install phpMyAdmin from the CentOS 7 guide -

The process should be the same for the CentOS 8 droplet as well.

Hope that this helps!


by Justin Ellingwood
While many users require access to a database management system like MySQL or MariaDB, not all users feel comfortable interacting with the SQL prompt on a daily basis. In this guide, we'll discuss how to install and secure phpMyAdmin, a web management interface for MySQL and MariaDB, on a CentOS 7 server. We will leverage the Apache web server for this guide.

sudo yum install phpmyadmin dont working

  • Hello, @muradhuseynli1234

    Could you please provide me with the output of the command? You can also download phpMyAdmin and install it manually:

    First, download the latest version of phpMyAdmin to the Apache web root directory using the following command:

    cd /var/www/html

    Once downloaded, unzip the downloaded file with the following command:


    Next, rename the extracted directory to phpmyadmin as shown below:

    mv phpMyAdmin-4.9.4-all-languages phpmyadmin

    Next, change the ownership of the phpmyadmin directory to the apache user:

    chown -R apache:apache /var/www/html/phpmyadmin

    Next, rename the file:

    cd /var/www/html/phpmyadmin

    Next, edit the file and define your secure password:


    Find the line below and update with your secure password, as shown below:

    $cfg['blowfish_secret'] = 'your-secure-password';

    Save and close the file. Then, import the tables for phpMyAdmin with the following command:

    mysql < sql/create_tables.sql -u root -p

    Hope that helps!