Litespeed - phpMyAdmin

One of the reasons many people want a PHP install is to use phpMyAdmin. This article goes through the procedure of installing and serving the latest version.

Assuming you already have a PHP domain being served from your Litespeed setup, we can start by moving to our sources folder and downloading the latest version of phpMyAdmin (It may be an idea to check the phpMyAdmin Website to see if a new version has been released).

You will notice that I am downloading the English version - I don't need the all-languages version but feel free to download the version you need:

cd ~/sources
wget http://heanet.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-2.10.1-english.tar.bz2

Now untar the sources and rename the directory to one of your choosing (I have chosen the simple name of phpmyadmin).

tar xjvf phpMyAdmin-2.10.1-english.tar.bz2
mv phpMyAdmin-2.10.1-english phpmyadmin

Now create a link from the phpmyadmin directory to your phpdomain.com public folder:

ln -s  /home/paul/sources/phpmyadmin /home/paul/public_html/phpdomain.com/public/dbadmin

I have called the link 'dbadmin'. My advice is not to call it something obvious such as phpmyadmin as that name is often scanned on my sites by script-kiddies looking for exploits. Pick a name you like (and will remember!).

Create a file called config.inc.php and add some configurations; I would suggest using 'http' as the auth-type rather than 'cookies' (There is an example config file in the phpmyadmin directory called config.sample.inc.php - this will give more examples and configurations):

nano phpmyadmin/config.inc.php

Example config.inc.php

In my example config.inc.php example (shown above) I have used 'mysqli' as my Server extension type. If you did not configure mysqli in the PHP install, change that to read 'mysql'. If you have no type of mysql support in your PHP configuration you will need to reinstall PHP.

For completeness we should restart the Litespeed server:

sudo /usr/local/lsws/bin/lswsctrl restart

Navigate to your domain and phpMyAdmin folder

http://www.phpdomain.com/dbadmin

Once you have entered your mysql username and password you will see the phpMyAdmin landing page:

That's it. My advice would be to head straight to the Privileges link and ensure you don't have any users without passwords or 'test' users. Do the same with the Databases link - make sure there are no 'test' databases.

PickledOnion.

Digg it | del.icio.us | reddit | StumbleUpon

Comments are closed for this article.