How do I get phpmyadmin to work?

PHPMyAdmin is a Web based MySQL Administration tool. You might find it handy on a JumpBox that uses MySQL (Drupal, Joomla, MediaWiki, PunBB, vTiger, SugarCRM, and WordPress). It doesn't come installed on a JumpBox by default, but installing it is not too complicated. Just Enable shell access, SSH to your JumpBox as admin and follow these instructions:

sudo apt-get update
sudo apt-get install phpmyadmin
sudo rm /var/www/phpmyadmin
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/
sudo nano /etc/phpmyadmin/apache.conf

At this point, you are editing the PHPMyAdmin apache configuration file. All you need to do is add a line a the top that says*

Alias /phpmyadmin /usr/share/phpmyadmin

Now you can save the changes you have made and then restart apache and get the MySQL root password as follows:

sudo /etc/init.d/apache2 restart
sudo grep password /etc/mysql/debian.cnf

Now to access PHPMyAdmin on your JumpBox just point your browser to http://jumpboxip/pypmyadmin. You will use the username root, and the password your found above.

NOTE: 'sudo' is a command that lets the admin user do things as the privileged root user. The first time you run it, it will ask you for the admin user's password. The admin user can do anything on the JumpBox using this command.

* If your JumpBox is accessible on the internet, you may want to change '/phpmyadmin' to some other unique string that you can remember, like '/myadmin1' and access it via that URL. Misconfigured PHPMyAdmin installations are popular hacker targets.

Works like a charm!

Works like a charm!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.