apache2 - mysql - phpmyadmin - debianise

I assume you are running apache2 already

Install mysql-server
#apt-get install mysql-server
set the root password on the ncurses menu

#apt-get install phpmyadmin
select apache2
skip the config-db crap

To set the password for the phpmyadmin setup
#cd /etc/phpmyadmin
#htpasswd -b ./htpasswd.setup admin password
Please use a descent password instead of password.

If apache2 is setup with virtual hosts and you do not want phpmyadmin to be accessible from every virtual host eg example.com/phpmyadmin move phpmyadmin.conf off /etc/apache2/conf.d

If not, you are done and you can login at http://example.com/phpmyadmin or and access the phpmyadmin setup at http://example.com/phpmyadmin/setup or

To setup phpmyadmin using the web interface
  1. login at https://example.com/phpmyadmin/setup with 'admin' and 'password'
  2. make the phpmyadmin/config.inc.php group writable ... just run
  3. Set whatever you want to set through the web interface
  4. Secure the phpmyadmin/config.inc.php again ... just run

So, to enable phpmyadmin for just one virtual host.
#cd /etc/apache2/conf.d/
#rm phpmyadmin.conf 
#/etc/init.d/apache2 restart
Now enable phpmyadmin for the virtual host by adding
Include /etc/phpmyadmin/apache.conf
to the virtual host configuration file eg
#echo "Include /etc/phpmyadmin/apache.conf" >> /etc/apache2/sites-available/some-virtual-host.example.com.conf
#/etc/init.d/apache2 reload

phpmyadmin debian ubuntu