[How To] Install phpMyAdmin from source code

Share with all..

phpMyAdmin provides Graphical User Interface (GUI) to manage MySQL database and users.

In this post, I am going to discuss steps to install phpMyAdmin using source code.


1) Download source code file from here on the server and copy it to document root folder of the Apache.

2) Extract the archive and rename the extracted folder to phpmyadmin.
It should display as:

[root@localhost]# pwd

Note: In my case, Apache document root is /var/www/html. It may vary depending on the Apache configuration.

3) Copy config.sample.inc.php file to config.inc.php present in the phpMyAdmin extracted folder.

[root@localhost phpmyadmin]# cp config.sample.inc.php config.inc.php

4) Open config.inc.php file in your favourite editor and set blowfish secret.

* This is needed for cookie based authentication to encrypt password in
* cookie
$cfg['blowfish_secret'] = 'a8b7c6d'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

5) Look for the following lines and enter the MySQL server login details.

/* User used to manipulate with storage */
 $cfg['Servers'][$i]['controlhost'] = '';
 $cfg['Servers'][$i]['controluser'] = 'root';
 $cfg['Servers'][$i]['controlpass'] = 'password';

Note: Do not set "AllowNoPassword" to true as it phpMyAdmin will not check for password while logging in. It should be set to false to ensure proper working.

/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;

6) Restart Apache service and check by browsing phpMyAdmin link.


That's All!

Share with all..

About Abhijit Sandhan

Loves Open Source, Blogging, Traveling, Hiking and sharing Knowledge!

Leave a Reply

Your email address will not be published. Required fields are marked *