Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Databases»How to Install and Configure phpMyAdmin on Ubuntu 18.04 & 16.04 LTS

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

    RahulBy RahulSeptember 20, 20152 Mins ReadUpdated:February 5, 2020

    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.

    • 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. 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 – 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 the 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.

    lamp mariadb MySQL php-mysql phpmyadmin PMA
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Create Linux Bootable USB from Linux Command-Line
    Next Article How to Enable SSH as root on AWS Ubuntu Instance

    Related Posts

    How To Install Linux, Nginx, MySQL, & PHP (LEMP Stack) on Ubuntu 22.04

    Updated:April 7, 20227 Mins Read

    How To Install MySQL Server on Ubuntu 22.04

    Updated:April 6, 20224 Mins Read

    How To Install LAMP Stack on Ubuntu 22.04 LTS

    Updated:April 20, 20225 Mins Read

    How To Install MariaDB on Debian 11

    4 Mins Read

    How to Install Redis on Debian 11 Linux

    Updated:September 16, 20213 Mins Read

    How To Install and Secure MongoDB on Ubuntu 20.04

    Updated:September 7, 20214 Mins Read

    14 Comments

    1. Diego Misael Blanco Murillo on March 4, 2018 9:49 pm

      Than you bro.

      Reply
    2. Carlos Eugenio on May 11, 2016 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?

      Reply
    3. Aamir on April 22, 2016 6:05 am

      Blank screen shows 🙁

      Reply
    4. internet fixer on January 11, 2016 7:27 am

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

      Rahul…FIX!

      Reply
      • Rahul on January 12, 2016 1:13 pm

        Thanks a lot.

        We have updated article accordingly.

        Reply
    5. finno on January 4, 2016 1:23 pm

      Thanks Tony

      That made it work for me 🙂

      Reply
    6. internet_user on November 19, 2015 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.

      Reply
      • tony on December 10, 2015 4:24 am

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

        Reply
    7. Cars wallpaper on January 6, 2015 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

      Reply
    8. jan on May 28, 2014 7:37 pm

      Thanks just what i needed

      Reply
    9. Carlos González on March 5, 2014 12:27 pm

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

      Reply
    10. Halfnium on February 27, 2014 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

      Reply
      • Diar Selimi on February 28, 2014 4:59 pm

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

        Reply
      • Mike Hughes on May 13, 2015 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

        Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Install Sublime Text 4 on Ubuntu 22.04
    • How to Enable / disable Firewall in Windows
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.