Install and Configure phpMyAdmin on Ubuntu LAMP


PhpMyAdmin is a nice database management and administration tool, it is easy to install it, but some people are having problems making it work under apache, that’s because it needs configuration. I presume you already have LAMP installed and configured on your machine, if not, please read this post – Install and Configure LAMP on Ubuntu first.

Just in case you haven’t installed phpMyAdmin yet, type the following line in the Terminal:
apt-get install phpmyadmin

To set up under Apache all you need to do is include the following line in /etc/apache2/apache2.conf, first type the following command to open up this file:
gksudo gedit /etc/apache2/apache2.conf

Add the following line of code inside apache2.conf:
Include /etc/phpmyadmin/apache.conf

Now restart Apache:
sudo /etc/init.d/apache2 restart

Point your browser to: http://domain/phpmyadmin, you should be able to see the phpMyAdmin landing page now!

Related Article:
Create a Subdomain Virtual Host on Ubuntu

Share and Enjoy:
  • Print this article!
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Technorati
  • Twitter
  • Yahoo! Bookmarks

  1. #1 by guns424 on March 13, 2008 - 11:53 am

    short, clear and simply works great! thanks for sharing this!

  2. #2 by R.Alamsha on July 28, 2008 - 8:23 pm

    I installed sugarcrm but could not run the install.php setup wizard. After installing phpmyadmin, everything works perfectly. THank you so much.

  3. #3 by admin on August 2, 2008 - 11:11 am

    hi, R.Alamsha, glad to know your problem’s solved. :)

  4. #4 by SaiKiran Chowdary Yarlagadda on September 16, 2008 - 2:41 am

    This was very Uaefull to me.Thankyou Dear.

  5. #5 by volto on September 22, 2008 - 2:02 pm

    excellent, thanks!

  6. #6 by Pradeeban on December 17, 2008 - 10:35 pm

    Nice work.
    Regards.

  7. #7 by SALMAN on April 19, 2009 - 8:49 am

    Thanks ,worked for me perfectly without any problem

  8. #8 by Maruf on April 20, 2009 - 11:12 am

    Hi

    I had to install phpMyadmin on www folder of on our Ubuntu server since our intranet developer can access it via Dreamweaver.

    I also applied the above commands but got an error message saying that it was not found.

    The developer can access the phpmyadmin administrative page but cannot access the mysql database.

    Any help in this regard will be higly appreciated.

    Thanks.

    Please also reply to my e-mail: mkhan@uwba.org

    _Maruf Khan

  9. #9 by harrysuke on April 26, 2009 - 8:55 am

    can someone tell me what is the default password for phpmyadmin/ mysql in ubuntu?

    all i know is that the default should be:
    username: root
    password :

    can someone teach me how to reset the password please?

  10. #10 by bus on May 7, 2009 - 10:00 pm

    Great stuff – thanks! :D

  11. #11 by Kaciak on May 13, 2009 - 1:24 am

    thanx

  12. #12 by pruthvi on June 3, 2009 - 3:58 am

    how to install phpmyabmin in ubuntu?

  13. #13 by pruthvi on June 3, 2009 - 4:04 am

    installation and configuration of phpmyadmin in ubuntu?

  14. #14 by william on June 20, 2009 - 6:49 pm

    thanks dude.. really appreciate this

  15. #15 by wtfbrb on June 29, 2009 - 3:28 pm

    How about upgrading to phpmyadmin 3 after ubuntu installs 2.11?

  16. #16 by rocky on July 17, 2009 - 12:19 pm

    you can also copy the conf file to the correct location. not sure why, but it doesn’t get installed sometimes.

    #copy the file to apache conf.d dir & rename so you can identify.
    sudo cp /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf

    #then restart
    sudo /etc/init.d/apache2 restart

  17. #17 by xion on July 27, 2009 - 10:06 pm

    Thank you! I have been working for hours trying to make this work(linux noob)!! I had no idea that the include file needed to be in an apache server .conf file! Huge help!

  18. #18 by Dave on August 11, 2009 - 5:14 pm

    i’m not sure what’s going on here, but i followed all your instructions exactly and there is no phpmyadmin directory installed in my /var/www directory, so when i go to http://localhost/phpmyadmin, there is nothing there.. it installed with no errors though… =/

  19. #19 by Arief on August 20, 2009 - 8:15 pm

    phpmyadmin works on my vps server now. Thank you!

  20. #20 by ritam on August 28, 2009 - 7:31 am

    thanxxxxxxxxxxxxx

  21. #21 by Daniel on September 13, 2009 - 2:11 pm

    Thanks, that really helps ubuntu newbies.

  22. #22 by Grundiamo on October 23, 2009 - 10:46 am

    Thanks Many many thanks … i was trying installing PHPmyadmin for days … u saved me ….

  23. #23 by Anna on November 12, 2009 - 2:48 pm

    you r so awesome!

  24. #24 by jeffrey on December 6, 2009 - 9:42 am

    pefect. this works.

  25. #25 by Sharninder on December 21, 2009 - 9:54 pm

    harrysuke :
    can someone tell me what is the default password for phpmyadmin/ mysql in ubuntu?
    all i know is that the default should be:
    username: root
    password :
    can someone teach me how to reset the password please?

    phpmyadmin uses the same password as mysql on your system so change mysql’s password. Try this:

    mysqladmin -u root -p’oldpassword’ password newpass

  26. #26 by Arun on December 22, 2009 - 5:54 pm

    Thank you!

  27. #27 by denzil on December 31, 2009 - 4:54 pm

    thanks great help

  28. #28 by Puneet Pandey on January 7, 2010 - 2:42 pm

    Thanks it works like a charm :)

  29. #29 by Mentile on February 2, 2010 - 6:15 pm

    This really works!!

    Thanks

(will not be published)