How to Install phpMyAdmin on Windows

Started by Kalyan, Nov 07, 2008, 11:23 AM

Previous topic - Next topic

Kalyan

How to Install phpMyAdmin on Windows

phpMyAdmin lets you control you MySQL database from a web browser.

To install PHPMyAdmin, you need to extract the .zip file to the C:\SimplePHP folder and rename the phpmyadmin folder as C:\SimplePHP\phpMyAdmin. After, open the config.inc.php file and find the line starting with $cfg['PmaAbsoluteUri'] and change it for :

$cfg['PmaAbsoluteUri'] = 'http://localhost/mysql/';

phpMyAdmin can also try to auto-detect the proper value if this directive is left as it is (blank) and this line is changed to 'TRUE'...

$cfg['PmaAbsoluteUri_DisableWarning'] = FALSE;



Next, you need to locate the series of lines starting with $cfg['Servers'][$i][] and make sure the four following lines are identical :

$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';




Since we installed PHPMyAdmin out of the C:\SimplePHP\root folder which is the web server's root folder, we will use a trick to make sure PHPMyAdmin is found by the web server.

To achieve this feat, you will once again need to open the httpd.conf file and insert the following code in the Aliases section (located at about two thirds of the beginning of the file) :
Alias /mysql/ "C:/SimplePHP/phpMyAdmin/"

<folder "C:/SimplePHP/phpMyAdmin/">
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.1
</folder>


This enables us to access PHPMyAdmin by typing the below address in our browser (the "/" is very important) :
http://localhost/mysql/

You are done!

Alternate Method

Download the full package of Xampp that contains everything. It also has a control panel, to admin everything. Xampp is the best and easiest way to do all this. For novice users I highly recomand Xampp.