How to Install and Configure phpMyAdmin on Ubuntu 16.XX

PhpMyAdmin is a user-friendly graphical interface to interact with MySQL/MariaDB and is a cornerstone of any webhosting 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.

Pre-Flight

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:
    https://[yourdomainhere]/phpmyadmin

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 and VPS servers, allowing you to get more familiar with other aspects of web hosting.

Be Sociable, Share!
    Here's 75 % off, Launch a New VPS Today. Find out why 30,000 customers have chosen our Best-in-Class Performance & 24x7 Heroic Support