Installing and configuring phpMyAdmin

Using MySQL from a commandline client is often not very convenient. Luckily there are several graphical clients. Perhaps the best one and certainly the most widely used is phpMyAdmin. It is freely available on the Internet. In this article, you would see how to install and configure phpMyAdmin to work with MySQL. If you experience troubles with these instruction, you might want to read the previous few articles. I am using:

- Apache 2.2.6,
- PHP 5.2.5
- MySQL 5.0.25
- Windows XP
- web server root is c:\www

1. Download phpMyAdmin
phpMyAdmin can be downloaded from here. Download the latest stable version without the -rc in the file name. Something like phpMyAdmin-2.11.2.2-english.zip.

2. Unzip inside web root
Unzip inside the web root. My web root, as defined in httpd.conf file, is c:\www. After unpacking, my directory should look like c:\www\phpMyAdmin\contrib\... You would have to rename phpMyAdmin-2.11.2.2-english to phpMyAdmin.

3. Set up config file
If you have a file c:\www\phpMyAdmin\config.inc.php, back it up. If you don't, create a new file with this name. Copy-paste the following code into this file. Add your password in place of PASSWORD. It appears twice in the file.

/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* phpMyAdmin sample configuration, you can use it as base for
* manual configuration. For easier setup you can use scripts/setup.php
*
* All directives are explained in Documentation.html and on phpMyAdmin
* wiki .
*
* @version $Id: config.sample.inc.php 10142 2007-03-20 10:32:13Z cybot_tm $
*/

/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = '';

/*
* Servers configuration
*/
$i = 0;

/*
* First server
*/
$i++;

$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'PASSWORD';

/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'config';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';
/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'root';
$cfg['Servers'][$i]['controlpass'] = 'PASSWORD';
/* Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';

/*
* End of servers configuration
*/

/*
* Directories for saving/loading files from server
*/
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';

Save this file.

Run phpMyAdmin
Open you browser and type http://localhost/phpMyAdmin