How to install phpMyAdmin on Windows
Saturday, November 15th, 2008 | Author:

These steps can be followed on Windows 2000, Windows NT servers, Windows 2003, Windows 2008 and Windows XP.

For steps on Linux refer the link below:

How to install PHPMyAdmin on Linux

How to install phpMyAdmin 2.11 on Windows Desktop and Server

Here are steps that will help you installed PHPMyAdmin on a Windows server.


>> PHP 4.3/4.4/5.1
>> MySQL 4.0/4.1/5.0


This installation was tested on phpMyAdmin-2.11.1
You can select the file from PHPMyAdmin Downloads


Configuration that needs to be noted, the one below are the one we have chozen. They might be different on your server:

Installation path: C:\www\phpMyAdmin (If you have Apache on your server then place out side of webroot of Apache)
Apache webroot : C:\www\webroot
My-SQL path : C:\www\mysql\bin
Access phpMyAdmin as :


1. Unpack the downloaded file under the directory C:\www
2. Rename directory C:\www\phpMyAdmin-2.11.1 to C:\www\phpMyAdmin
3. Make a copy of C:\www\phpMyAdmin\libraries\config.default.php
4. Open the default configuration file of PHPMyAdmin C:\www\phpMyAdmin\libraries\config.default.php and make following changes:

a. Find:

$cfg['PmaAbsoluteUri'] = '';

Put the full URL of PHPMyAdmin in the quotes, you can replace the IP address with the IP address of your server or your domain name:

$cfg['PmaAbsoluteUri'] = '';

b. PHPMyAdmin can also try to auto-detect the proper value for the above directive if it is left as it is [BLANK] and the below line is changed to ‘TRUE':

$cfg['PmaAbsoluteUri_DisableWarning'] = FALSE;

c. Authentication Method:

— For single-user (root or trusted) environment:

— Method 1 would be to prompt client for MySQL user/password, this option will only work if your database is not accessed by other users:

$cfg['Servers'][$i]['auth_type'] = 'http';

— Method 2 is to store MySQL user/password under config.ini.php file.

$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root-password';

Please replace the user and password with the administrator user and password of your MySQL server.

d. Authentication Method — for multi-user (untrusted) environment, this will allow to give access to your developers or clients if it is a shared server in hosting environment.
This step is also required to for enabling phpMyAdmin’s relational features

$cfg['Servers'][$i]['auth_type'] = 'http';
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = 'pmapass';

Save the password: pmapass

e. Now we will have tp create MySQL controluser user ‘pma@localhost’ with password ‘pmapass’, and with the proper permissions to the user:

C:\www\mysql\bin> mysql -u root -p
mysql> GRANT USAGE ON mysql.* TO 'pma'@'localhost' IDENTIFIED BY 'pmapass';
Note the SQL password

mysql> GRANT SELECT (Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv, Execute_priv, Repl_slave_priv, Repl_client_priv) ON mysql.user TO 'pma'@'localhost';
mysql> GRANT SELECT ON mysql.db TO 'pma'@'localhost';
mysql> GRANT SELECT ON TO 'pma'@'localhost';
mysql> GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv) ON mysql.tables_priv TO 'pma'@'localhost';
mysql> quit


a. If you run Apache as the webserver then you will follow the steps below:

Open file C:\www\Apache2\conf\httpd.conf to edit it and uncomment line (remove the beginning character ‘#’)
I would suggest you to backup the http.conf file incase you have messed it up.

LoadModule alias_module modules/

b. Make sure directive ‘DirectoryIndex’ contains ‘index.php’ http.conf

DirectoryIndex index.html index.html.var index.php

c. Then add the following lines:

Alias /phpMyAdmin "C:/www/phpMyAdmin"

Options None
AllowOverride None
order deny,allow
deny from all
allow from

Do not forget to restart Apache once you have made the above changes and have saved the http.conf file.


a. Open IIS Webserver from START >> RUN: inetmgr
b. In IIS manager expand SERVER_NAME >> Web Sites and select Default WebSite.
c. In the Right pane right click in white soace and select New >> Virtual Directory.
d. In the Virtual Directory creation Wizard, click Next.
e. Give directory Alias (Name) as PHPMyadmin and click Next.
f. Click on Browse button and navigate to “C:\www\phpMyAdmin”
e. Select “Read”, “Run Script” & “Execute” and click Next.
g. Now Right click on the PHPMyAdmin Virtual directory and select permissions.
h. Give “Read & Execute” permissions to IUSR_ and inherit the permissions.
i. Right click on the PHPMyAdmin Virtual directory >> Properties >> Virtual Directory >> Configuration and map .php extention to PHP executable.


Configuration for PHP v5:

These steps are only required if you want to use PHP5 for PHPMyAdmin, in PHP4 PHP extension php_mysql.dll is build in and extension php_mysqli is not supported.:

a. Edit file %SYSTEMROOT%\php.ini, under the ‘Dynamic Extensions’ Section:

Uncomment line:

If using MySQL v4.0 : Uncomment line

If using MySQL v4.1 : Insert line

Edit and update server extension line:
$cfg['Servers'][$i]['extension'] = 'mysqli';

Enable phpMyAdmin’s Relational Features:

Please make a note that these steps are required for “Authentication Method — for multi-user (untrusted) environment”

Edit phpMyAdmin’s configuration file C:\www\phpMyAdmin\

$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';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';

Now Run phpMyAdmin’s sql script file ‘create_tables.sql':

C:\www\mysql\bin> mysql -u root -p
mysql> source C:\www\phpMyAdmin\scripts\create_tables.sql
mysql> quit

That is it, you should be done with PHPMyAdmin installation on Windows.