Updated: 20 April 2010
There are a variety of methods available to interact with the MySQL database. The free shareware project, phpMyAdmin, is the most popular open-source project on the web.
This tutorial will go through the steps necessary to install, setup and configure phpMyAdmin for Apache 2.0.x with MySQL 4.0.x on a machine running Microsoft Windows.
As a guide, this tutorial will recommend the following installation folder:
Where you choose to install phpMyAdmin is up to you, just be aware to substitute appropriately when necessary.
This tutorial assumes that Apache, PHP (4 or 5) and MySQL have all been installed and setup correctly. Read through the tutorials Install and Setup Apache/PHP and Install and Setup MySQL for more details.
This tutorial makes the following assumptions:
If your installation folder or localhost URL differ from either of these, be sure to substitute appropriately.
Download the latest stable version of phpMyAdmin (2.6.x).
phpMyAdmin : zip package
http://www.phpmyadmin.net/home_page/downloads.php
Example: phpMyAdmin-2.6.2.zip (2,852 Kb)
Unzip the phpMyAdmin zip package into the C:\www\ directory and rename the C:\www\phpMyAdmin-2.6.2\ directory to C:\www\phpMyAdmin\.
Note: The directory C:\www\phpMyAdmin\ will be referenced in the following section. If your installation folder differs from this, substitute appropriately.
Edit the config.inc.php file found in the C:\www\phpMyAdmin\ directory.
$cfg['PmaAbsoluteUri'] = 'http://localhost/phpmyadmin/';
Note: Substitute appropriately if your localhost URL differs from this.
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = 'myPass'; // MySQL password (only needed
Note: Be sure to replace "myPass" with your MySQL root password.
Note: If you have not set (or have forgotten) the root password, please read our Install and setup MySQL tutorial, specifically the Reset the MySQL root password section.
Note: The directory C:\www\Apache2\ will be referenced in the following section. If your installation folder differs from this, substitute appropriately.
Apache now needs to know where to find the phpMyAdmin code. The easiest solution is to create a quick Alias for the phpMyAdmin directory.
Edit the httpd.conf file found in the C:\www\Apache2\conf\ directory.
Alias /freeangle "D:/Web/freeangle"
Alias /phpmyadmin "C:/www/phpMyAdmin"
After restarting the Apache web server, we may now view the phpMyAdmin website through the URL address http://localhost/phpmyadmin/.
Note: Alias names are case-sensitive. For example, http://localhost/phpMyAdmin/ will not work unless "Alias /phpMyAdmin" is specified.