Wednesday, June 1, 2011

How to install phpmyadmin on Debian 6?

1. Install phpmyadmin by apt-get.
$apt-get install phpmyadmin

2. Search for the phpmyadmin configuration directory and look for apache.conf
#Use "updatedb" to update the slocate database. We need to use "locate" to search for the file.
#Search for "apache.conf"
$locate apache.conf

3. Edit the file /etc/apache2/apache2.conf and include the phpmyadmin apache.conf.
$nano /etc/apache2/apache2.conf
# add the line below at the end of the file and save it.
Include /etc/phpmyadmin/apache.conf

4. Restart Apache2
$/etc/init.d/apache2 restart

5. Go to http://yourdomain/phpmyadmin to see if it works.


  1. It worked for me on Debian 6!

  2. These facts are really interesting. Few of them were well known for me but many of them were brand new for me too!
    I will print this one out and show to my friends because they will be definitely interested in that. Thanks!

  3. Thanks for the feedback guys! Feel free to read my other posts.

  4. Hey! really thanks man, many webpages refer to squeeze, now I can named you "Apache Man" :)

    P.D.: sorry for my english

  5. ¡Gracias!
    Me tiraba este error: "Got packets out of order" seguĂ­ tus pasos y me funciona perfecto.

  6. Incase you want to install phpmyadmin in nginx. Go to the link below.

  7. yeah man, you really helped me out there... i reinstalled debian6 4 times on my server, because i thought i installed it wrong... Thanks!

  8. Great work, you'd be surprised how long I've been searching for this.

  9. Hello,

    This is good solution, but we can do even better, i have something like this in mind :

    echo -e "deb stable all \ndeb-src stable all" >> /etc/apt/sources.list; apt-get update && apt-get install phpmyadmin; echo "Include /etc/phpmyadmin/apache.conf" >> /etc/apache2/apache2.conf; service pache2 restart

    This will add new repository with last phpmyadmin version(3.3.7), then system run update, then we run phpmyadmin install, command will edit apache2 config file, apache2 restart and we're done.

    Cool, no ;)Have a nice life.

  10. Thanks Guys!

    @Nenad = you can also enter the command "/etc/init.d/apache2 restart" to replace "service apache2 restart"

  11. Thanks man, it works good for me in Debian