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’


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


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


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


Now go to:


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 ‘’ in that folder, and the file will have something like this:

/* Servers configuration */
$i = 0;
/* Server: localhost [1] */
$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:


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: Logo

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s