How to Install and Configure phpMyAdmin on Ubuntu 16.XX

Posted on by Helpful Humans of Liquid Web
Category: Tutorials | Tags: PHPMyAdmin, Ubuntu
Reading Time: 2 minutes

PhpMyAdmin is a user-friendly graphical interface to interact with MySQL/MariaDB and is a cornerstone of any web hosting environment. Because of this, it is also a commonly exploited part of the server and should be connected to with https://. If you have not yet installed an SSL on your domain, its good idea to do so for security with PhpMyAdmin.


Before we begin there are a few things you will want to confirm.

  1. First you will want to have your root MySQL password, typically the same as your root ssh login, and second on your server you will want to make sure you have the following installed:
    • PHP
    • Apache
    • MySQL/MariaDB
  2. These should be installed by default on your server. But if you doubt they are installed you can check by giving the following command in the SSH shell:
    php –v && httpd –v && mysql -V
  3. This will print the version of each to confirm if they are installed.

Installation and Configuration

  1. Once you have confirmed these are installed on your Ubuntu server you will next install the PhpMyAdmin program via the following commands in the SSH shell:sudo apt-get update
  2. sudo apt-get install phpmyadmin php-gettext php-mbstring
  3. The commands will ask you several questions to complete the installation:
  4. For the server selection, use apache2 (select with the space bar, giving a * symbol then hit Tab followed by Enter to confirm)
  5. Choose Yes when you are asked if you want dbconfig-common to set up the database.
  6. When prompted, enter and confirm a PhpMyAdmin password of your choice, this will be specifically for the user PhpMyAdmin (be sure to use a strong password for this including upper & lowercase letters, numbers, and special characters).
  7. This will create all the necessary files and databases to configure PhpMyAdmin.
  8. To finalize the installation and configuration you will need to enable the PHP extensions mcrypt and mbstring and restart apache with the following commands:
    sudo phpenmod cryptsudo phpenmod mbstring
    sudo systemctl restart apache2
  9. .PhpMyAdmin will now be accessible via the internet by using the following URL template:

When you get to the page, give the user “root” and the root MySQL password to gain access to the interface.

While this guide is a great way to get started with PhpMyAdmin, the software is something fully supported in our Dedicated servers and VPS servers, allowing you to get more familiar with other aspects of web hosting.

Avatar for Helpful Humans of Liquid Web

About the Author: Helpful Humans of Liquid Web

Latest Articles

What is VMware Fusion?

Read Article

How to Install Zen Cart on CentOS 7

Read Article

Five Steps to Create a Robots.txt File for Your Website

Read Article

Premium Business Email Pricing FAQ

Read Article

Microsoft Exchange Server Security Update

Read Article