phpMyAdmin is a nifty GUI tool for administering MySQL installations. Don't confuse it with phpPgAdmin (for postgres), they're very different (the latter is nicer to use, and is made by different people).
It doesn't need to be installed, just downloaded and extracted somewhere convenient. You can drop it in /var/www/html and Alias to it, or the user can just keep it in their public_html. Some distros (eg. Debian) have packaged versions available, but this isn't necessary. You don't really need it managed, and you can apply updates yourself; a non-packaged version is more flexible.
Grab a tarball from http://www.phpmyadmin.net/home_page/downloads.php
You can probably go with the latest stable English version. Version 3 requires minimum versions of PHP 5.2 and MySQL 5.0.15, so check that first.
# This will obviously vary depending on your system. For the record, RHEL5 doesn't meet the PHP requirement. $ php -v PHP 4.3.9 (cgi) (built: Jul 15 2008 10:14:59) $ /usr/libexec/mysqld --version /usr/libexec/mysqld Ver 4.1.22 for redhat-linux-gnu on i386 (Source distribution)
Unpack the tarball to /var/www/html/
Create a symlink to the unpacked tarball. This make future upgrades really easy.
ln -s phpMyAdmin-22.214.171.124-english phpmyadmin
Upgrading is almost the same as installing.
- Download and unpack the tarball
Remove the old symlink
Create the new symlink
ln -s phpMyAdmin-126.96.36.199-english phpmyadmin
- Configure it as detailed below
- Any existing login cookies will now be invalidated; the user will need to login again
phpMyAdmin needs almost no configuration, it's easy!
cd into phpmyadmin (the symlink)
Create a config file from the sample
cp config.sample.inc.php config.inc.php
- Edit config.inc.php
Set the blowfish_secret to a non-empty value. Try not to do anything stupid like having quotemarks or backslashes in there.
$cfg['blowfish_secret'] = 'thisIsAVerySecureStringJustMashTheKeyboardABitsjkefhkscejrnhsueh'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
I did a fresh install of 188.8.131.52 on a server and PHP was dying with fatal errors, "mcrypt_encrypt(): Size of key is too large for this algorithm in /.../mcrypt.lib.php". WTF? Shortening the 'blowfish_secret' string fixed this.
Check that auth_type is cookie
Edit the relevant apache vhost config and add an Alias entry for the installation
# phpMyAdmin Alias /phpMyAdmin /var/www/html/phpmyadmin
- Reload Apache and test it