upgrading phpMyAdmin

Recent exploits that use phpMyAdmin highlight the need to keep this code up to date. For more info, see:

#first set up the basic info.
#find latest version here: http://sourceforge.net/projects/phpmyadmin/files/
#pma directory--could be: mydir=/usr/share
# using ln -sfn /usr/share/phpmyadmin/ /var/www/html/phpMyAdmin

phpMyAdmin=phpMyAdmin  #could be: phpMyAdmin=phpmyadmin
#test with:
ls $mydir/$phpMyAdmin/config.inc.php

#now do the install (you may want to run this one line at a time

cp -a $mydir/$phpMyAdmin/config.inc.php ~
wget -O - "http://downloads.sourceforge.net/project/phpmyadmin/phpMyAdmin/$version/phpMyAdmin-$version-english.tar.bz2"  | tar xj -C $mydir
mv $mydir/$phpMyAdmin $mydir/$phpMyAdmin-old
mv $mydir/phpMyAdmin-$version-english $mydir/$phpMyAdmin
cp -a ~/config.inc.php $mydir/$phpMyAdmin

#once you have tested it, then the old version can be deleted:

rm -Rf $mydir/$phpMyAdmin-old

#If the program needs to be setup:

cd $mydir/$phpMyAdmin
mkdir config                  # create directory for saving
chmod o+rw config             # give it world writable permissions

#visit the /setup page

mv config/config.inc.php .    # move file to current directory
chmod o-rw config.inc.php     # remove world read and write permissions
rm -rf config                 # remove not needed directory