Skip to content

How to Install and Configure phpMyAdmin on Ubuntu 18.04 & 16.04 LTS

How To Install phpMyAdmin in Ubuntu 18.04, 16.04 and 14.04, Debian and LinuxMint Systems, phpMyAdmin is an interface for managing MySQL and MariaDB Servers

Steps
4
Category
Databases
Covers
LAMP Stack, MariaDB, MySQL
On this page 4 steps

phpMyAdmin is the graphical web-based database management tool for MySQL. phpMyAdmin is easy to use and provides most of the options to work and manage your MySQL server. It also provides an easy way to set up database replication between multiple MySQL hosts with easy step wizard.

This article will help you to install phpMyAdmin in Ubuntu systems using the apt package manager. To install phpMyAdmin on CentOS, Redhat and Fedora refer below link.

Step 1 of 4Install LAMP Stack

We assume you already have installed LAMP on your system. If you do not have installed, Use the following command to install it. The below command will install Apache2, PHP5 and MySQL server in your Ubuntu, Debian and LinuxMint systems.

sudo apt-get update
sudo apt-get install apache2 php mysql-server

Step 2 of 4Install phpMyAdmin

After installing LAMP stack on your system, let’s install phpMyAdmin using the command in your Ubuntu system.

sudo apt-get install phpmyadmin

During installation it will prompt for selecting web server, you have installed on your system. Select the appropriate web server you used.

phpmyadmin-on-ubuntu-1

Step 3 of 4Configure Apache2 for phpMyAdmin

The installer creates and an Apache configuration file /etc/phpmyadmin/apache.conf for phpMyAdmin. Also, create a soft link to be used by Apache. Make sure a soft link is created at /etc/apache2/conf-available/phpmyadmin.conf. In case a soft link is not created and enable phpMyAdmin.

sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo a2enconf phpmyadmin

After updating the above entry, restart Apache2 service using the following command

sudo service apache2 restart

Step 4 of 4Access phpMyAdmin

You phpMyAdmin installation has been completed successfully. Open you favourite web browser and access following url to open phpMyAdmin, change the localhost with servers hostname or ip address.

 http://localhost/phpmyadmin/

Install phpMyAdmin in Ubuntu

Using single phpMyAdmin we can manage multiple MySQL servers by adding multiple remote MySQL server. Use this article to add multiple MySQL hosts in phpMyAdmin.

Rahul

Rahul Kumar is the founder and chief editor of TecAdmin.net. A Red Hat Certified Engineer (RHCE), he has worked in IT since 2009, with hands-on experience in Linux system administration, DevOps, web hosting, cloud platforms and automation. He started TecAdmin in 2013 to share practical, step-by-step guides, and leads its editorial work with one aim: making technical learning clear and useful for sysadmins, developers and beginners alike.

14 Comments

  1. I had two problems in the installation. I am using ubuntu mate 16.04

    When I tried sudo apt-get install apache2 php5 mysql-server there is not php5

    I tried php alone and it worked.

    All others are ok. I did the configuration and when I look for localhost it works! but if I ask for localhost/phpmyadmin there is a problem:
    A page with a lot of text starting with:
    addJSON( ‘list’, PMA_RecentFavoriteTable::getInstance(‘recent’)->getHtmlList() ); exit;

    How can I get it work?

  2. * Restarting web server apache2 [fail]
    * The apache2 configtest failed.
    Output of config test was:
    apache2: Syntax error on line 223 of /etc/apache2/apache2.conf: Could not open configuration file /etc/phpmyadmin/apache2.conf: No such file or directory
    Action ‘configtest’ failed.
    The Apache error log may have more information.

  3. tnk i has try, good and work, but i has try many more tutorial but this tutorial instal web server on ubuntu work

  4. Instead of the three-package apt-get command given above, I used the alternative monolithic LAMP package command:

    sudo apt-get install lamp-server^ (The trailing carat is required.)

    In that case, the Include directive to be added to the end of /etc/apache2/apache2.conf for phpMyAdmin’s benefit is:

    Include /etc/phpmyadmin/apache.conf

    1. I went through the whole MyPhpadmin and it will not work for me. Says server can’t be found. Any help appreciated

Leave a Reply

Your email address will not be published. Required fields are marked *


Back to top