• Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us
TecAdmin
Menu
  • Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us

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

Written by Rahul, Updated on September 19, 2018
Databases lamp, mariadb, mysql, php-mysql, phpmyadmin, PMA

phpMyAdmin is the graphical web-based database management tool for MySQL. phpMyAdmin is easy to use and provides most of the option’s 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.

  • How to Install phpMyAdmin on CentOS/RHEL.

Step 1 – Install 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. 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 – Install 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 appropriate web server you used.

phpmyadmin-on-ubuntu-1

Step 3 – Configure 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 – Access 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.

Share it!
Share on Facebook
Share on Twitter
Share on Reddit
Share on Tumblr
Rahul
Rahul
Connect on Facebook Connect on Twitter

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

Related Posts

  • How To Install LAMP (Apache, MySQL, PHP) on Debian 10

    November 24, 2019
  • How to Install MariaDB 10.4 on CentOS 8 & RHEL 8

    October 20, 2019
  • How To Install MariaDB on Debian 10 (Buster)

    October 16, 2019
  • How To Install MySQL on Debian 10 (Buster) Linux

    July 23, 2019
  • How To Install MySQL 8.0 on CentOS/RHEL 7/6 & Fedora 30/29

    June 23, 2019

14 Comments

  1. Avatar Diego Misael Blanco Murillo Reply to Diego
    March 4, 2018 at 9:49 pm

    Than you bro.

  2. Avatar Carlos Eugenio Reply to Carlos
    May 11, 2016 at 2:31 am

    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?

  3. Avatar Aamir Reply to Aamir
    April 22, 2016 at 6:05 am

    Blank screen shows 🙁

  4. Avatar internet fixer Reply to internet
    January 11, 2016 at 7:27 am

    Step 3 should be:
    Include /etc/phpmyadmin/apache.conf
    (there should be no 2 in that)

    Rahul…FIX!

    • Rahul Rahul Reply to Rahul
      January 12, 2016 at 1:13 pm

      Thanks a lot.

      We have updated article accordingly.

  5. Avatar finno Reply to finno
    January 4, 2016 at 1:23 pm

    Thanks Tony

    That made it work for me 🙂

  6. Avatar internet_user Reply to internet_user
    November 19, 2015 at 5:31 pm

    * 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.

    • Avatar tony Reply to tony
      December 10, 2015 at 4:24 am

      use include /etc/phpmyadmin/apache.conf instead of include /bla/blabla/apache2.conf…

  7. Avatar Cars wallpaper Reply to Cars
    January 6, 2015 at 12:28 pm

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

  8. Avatar jan Reply to jan
    May 28, 2014 at 7:37 pm

    Thanks just what i needed

  9. Avatar Carlos González Reply to Carlos
    March 5, 2014 at 12:27 pm

    Thanks a lot for this tutorial! It’s help me , thanks again. Good work.

  10. Avatar Halfnium Reply to Halfnium
    February 27, 2014 at 10:33 pm

    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

    • Avatar Diar Selimi Reply to Diar
      February 28, 2014 at 4:59 pm

      This way that Halfnium is much easier than the one explained in the article !
      Thank you Halfnium 🙂

    • Avatar Mike Hughes Reply to Mike
      May 13, 2015 at 7:18 pm

      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

Cancel reply

Popular Posts

  • How to Install Python 3.8 on Ubuntu, Debian and LinuxMint
  • How to Restart Network Service on CentOS 8 or RHEL 8
  • How to Check IP Address on CentOS 8
  • How to Install Java 11/8 on Amazon Linux
  • How to Configure Static IP on CentOS 8 (CLI)
Copyright © 2013-2019 TecAdmin.net. All Rights Reserved. This site uses cookies. By using this website you agree with our term and services
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkNo
Revoke cookies