How to activate login page on PhpMyAdmin

For those of you who are asking, how can you secure the database which can be seen on your PhpMyAdmin. Here’s how you can do it.

If you don’t know what PhpMyAdmin is, for a short intro. It is an application created through PHP which allows you to manage your MySql Database. Its automatically installed on your computer once you install Wampserver.

First thing that you’ll need to do is to launch wampserver.

Then left click on the wampserver icon on the system tray and select ‘www directory’

image

A new window will open up. Now, you have to go one step backward. So if you have:

D:Programswampwww

Then you will have to remove the ‘www’ part. And it will look something like this:

D:Programswamp

I’m now assuming that we have the same window:

image

Now go to:

appsphpmyadmin3.2.0.1

Remember that we may not have the same version number for phpmyadmin so its just ok if you will be seeing different number than mine.

Now open up ‘config.inc.php’ in that folder, and the file will have something like this:

<?php
 
/* Servers configuration */
$i = 0;
 
/* Server: localhost [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
 
/* End of servers configuration */
 
$cfg['DefaultLang'] = 'en-utf-8';
$cfg['ServerDefault'] = 1;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
 
?>

Search for this line:

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

And change the ‘config’ into ‘cookie’:

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

Save that, then open up phpmyadmin, and it will now look like this:

image

Just type in ‘root’ for the username, and the password would be none. But if you have put a password before,  then input it in there. Remember that the password in here is the same as your password in MySql Server.

If you constantly cannot login with the default username and password. Then you might want to clear the cache.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s