How to install Nginx-based phpMyAdmin (LEMP) on Ubuntu 20.04 LTS

    This tutorial shows you how to install phpMyAdmin from Nginx, MariaDB and PHP7.4 (LEMP) on Ubuntu 20.04. phpMyAdmin is a free and open source database management program written in PHP. It offers a web GUI for managing a MySQL or MariaDB database.

    phpMyAdmin allows:

    • Searching databases and tables ;
    • Creating, copying, renaming, modifying and deleting databases ;
    • to create, copy, rename, modify and delete tables;
    • to perform the table service;
    • to add, modify and delete fields;
    • to execute any SQL expression, even multiple questions;
    • to create, modify and reduce the indexes;
    • Upload text files in tables ;
    • Create and read dumps from tables or databases ; Try this web-site Linux Server Support.
    • Export data to SQL, CSV, XML, Word, Excel, PDF and LaTeX formats
    • to manage multiple servers;
    • Manage MySQL users and permissions ;
    • Check server settings and runtime information with configuration requests ;
    • Check the integrity of the links in the MyISAM tables;
    • Automatically create complex queries with the Query-by-example (QBE) function
    • Connecting the required arrays ;
    • create a PDF file of the layout of the database;
    • to perform a global search of a database or subset thereof;
    • convert stored data into any format using a number of predefined functions, such as displaying BLOB data as an image or a download link
    • for the management of InnoDB tables and foreign keys ;


    To follow this tutorial it is necessary that the Ubuntu 20.04 operating system is running on a local computer or a remote server.

    If you are looking for a VPS (Virtual Private Server), you can click on this special link to get $100 free credit on DigitalOcean. (For new users only). If you are already a DigitalOcean user, you can follow this special link to get a $50 free credit on Vultere (for new users only).

    It is assumed that you have already installed the PMES stack in Ubuntu 20.04. Otherwise, read the following manual.

    Let’s start installing phpMyAdmin.

    Step 1: Downloading and installing phpMyAdmin on Ubuntu 20.04

    phpMyAdmin is part of the Ubuntu 20.04 software repository, so we can easily install it using the following cmdlet.

    sudo apt update
    sudo apt installation by phpmyadmin

    The above command installs all necessary dependencies, including PHP7 extensions. During installation, the program asks if you want to use dbconfig-common to configure the database. Press Tab to select Yes.


    This will also create a new user database called phpmyadmin. Enter a password for this user.

    fpmiadmin riot password-20.04

    You will then be prompted to select a web server to configure. Nginx is not listed. Therefore, press the tab key and press OK to skip this step.

    Medium-term insurgency action plan - 20.04

    A new database is then created with the name phpmyadmin, and the user of the phpmyadmin database has the necessary rights to manage this database. If you are as interested as I am, you can login to MariaDB and see what privileges phpmyadmin users have.

    You can use the following command to connect to the MariaDB server.

    sudo mysql -u root

    Then check the authorizations.

    See grants for [email security];

    A way out:

    phpmyadmin database configuration

    As you can see, a phpmyadmin user has full rights in the phpmyadmin database. Now, you can get away with it:

    A way out;

    Step 2: Creating a Nginx server block for phpMyAdmin

    To access the phpMyAdmin web interface, we need to create the Nginx server block by executing the following command.

    ship nano /etc/nginx/conf.d/phpmyadmin.conf

    We will configure it so that access to phpMyAdmin is via the subdomain. Insert the following text into the file. Replace with your own subdomain and don’t forget to create a DNS-A record for it.

    server [
    listen 80 ;
    listen [:]:80 ;
    server_name ;
    root /usr/share/phpmyadmin/ ;
    index.php index.html index.nginx-debian.html ;

    access_log /var/log/nginx/phpmyadmin_access.log ;
    error_log /var/log/nginx/phpmyadmin_error.log ;

    Location / {
    try_files $uri/ /index.php;

    Location ~ ^/(doc|sql|setup)/ {

    location ~ .php$ {
    fastcgi_pass unix:/run/php/php7.4-fpm.sock;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
    include snippets/fastcgi-php.conf;

    Place ~ /.ht {
    denies everything;

    Your phpMyAdmin files can be found in /usr/share/phpmyadmin/. Save the file and close it. Then test the Nginx configuration.

    sudo nginx -t

    If the test was successful, restart Nginx to make the changes take effect.

    sudo systemctl restart nginx

    You should now be able to access the phpMyAdmin web interface via

    how to install a miadmin-in-tube

    Step 3: Installation certificate TLS

    To secure the phpMyadmin web interface, we can install a free Let’s Encrypt TLS certificate Install the Let’s Encrypt client from the Ubuntu 20.04 repository as shown below

    install sudo apt certbot python3-certbot-nginx

    Python3-certbot-nginx is an nginx plugin for Certbot. Now execute the following command to obtain and install the TLS certificate.

    sudo certbot –nginx –agree-tos –redirect –hsts –staple-ocsp -d –email [protected by email]


    • -Inginx: Using a Nginx Authenticator and Nginx Installer
    • -agri-tos: Okay, let’s encrypt the terms of use.
    • -directly: Implement HTTPS for 301 redirects.
    • -…. Add a Strict Transport Security header to every HTTP response.
    • -stack-okr: Do not allow OCSP.
    • -Could be the bar. -Could be the bar: Adds OCSP must not add renewal to the certificate
    • the -d flag is accompanied by a list of domain names separated by commas. You can add up to 100 domain names.
    • -E-mail: Email used to store and restore contacts.

    You will be asked if you want to receive e-mails from the EFF (Electronic Frontier Foundation). After selecting Y or N, your TLS certificate will be automatically received and configured for you as indicated in the following message.


    Step 4: TLS certificate Test

    Go to to test your TLS certificate and TLS configuration. You should get an A+ because the HSTS is on.

    hip injuries phpmyadmin

    Step 5: Troubleshooting PhpMyAdmin Connection error

    If you connect to the MariaDB root, you can see the following error.

    #1698 – Access denied to user ‘root @’localhost


    mysqli_real_connect() : (HY000/1698): Access is denied to the root user ‘@’localhost’.

    If you login with a phpmyadmin user, you will not see the error above. However, a custom phpmyadmin can only be used to manage the phpmyadmin database. The reason for this error is that the root user of MariDB is authenticated by default through the unix_socket plugin, and not through the mysql_native_password plugin. To circumvent this problem, we can create another admin user and give him all the privileges.

    Connect to the MariaDB server via the command line.

    The ship Mariadba – the carrot

    Create an administrator user with password authentication.

    create a user to [protected via e-mail] identified with a password of your choice;

    Give all privileges for all databases.

    Give full privileges for *.* for [email security] with Deploy ;

    Privilege and flash output ;

    to relinquish those privileges;

    A way out;

    You can now login to phpMyAdmin with an administrator account and manage all the databases.

    TLS certificate Automatic renewal

    To update the certificate automatically, simply change the root user’s crontab file.

    The centre of the ship’s crown

    Then add the next line at the end.

    @daily certbot renew –stil && systemctl reload nginx

    A restart of Nginx is required before it can accept the new certificate from customers.


    I hope this tutorial helped you install phpMyAdmin from Nginx on Ubuntu 20.04 LTS. As always, if you find this message useful, subscribe to our free newsletter for more tips and tricks. Attention 🙂

    Evaluate this training manual.

    On second thought: 0 Average : 0]install phpmyadmin ubuntu 18.04 nginx digitalocean,nginx phpmyadmin 403,phpmyadmin nginx centos,install mysql ubuntu 18.04 nginx,nginx phpmyadmin windows,uninstall phpmyadmin ubuntu 18.04 nginx,install phpmyadmin ubuntu 18.04 linuxize,install adminer ubuntu 18.04 nginx

    Recent Articles

    Inflammatory skin diseases

    INFLAMMATORY SKIN DISEASES AND THEIR TREATMENT The most common and important inflammatory skin diseases include neurodermatitis, psoriasis, acne and rosacea. We are also aware of many...

    Unravel the XDR Noise and Recognize a Proactive Approach

      Cybersecurity professionals know this drill nicely all too nicely. Making sense of heaps of info and noise to entry what actually issues. XDR (Prolonged Detection & Response) has been a technical acronym thrown round within the cybersecurity business with many notations and...

    PLATYPUS: Hackers Can Obtain Crypto Keys by Monitoring CPU Power Consumption

      Researchers have disclosed the small print of a brand new side-channel assault technique that can be utilized to acquire delicate data from a system...

    The Container configurations in Amazon ECS

      Revealed: November 7, 2020 | Modified: November 7, 2020 | Zero views A fast put up on superior container configurations in Amazon ECS. ECS container superior...

    Antivirus Testing – VIPRE for your Home and Business

      Individuals typically marvel, “What’s one of the best antivirus?” A number of distributors will declare that their product is one of the best within...

    Related Stories