Creating a login screen in phpMyAdmin

When installing local applications on your laptop to run on WAMP server it is often useful to create separate databases and logins for the applications so you can keep things in order. There are several ways to do this but I thought I would set down a step by step process that dummies such as me could follow.

So if you wish to install WordPress, Mantis or Limesurvey as local applications this short tutorial shows you how to do it.

When WAMP server is first installed the root user is created with no password and as default no login intermediate screen is available.

The first task is to edit the phpMyAdmin config file to correct this:

  • Navigate to C:\wamp\apps\phpmyadmin3.3.9
  • And open config.inc.php in wordpad
  • Define two passwords yourpasswordA and yourpasswordB
  • Add the changes to your config .inc.php file  as shown in red below
  • Save the file and close WordPad

Config.inc.php changes:

$cfg[‘blowfish_secret’] = ‘yourpasswordA’;

/* 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’] = ‘cookie‘;
$cfg[‘Servers’][$i][‘user’] = ‘root’;
$cfg[‘Servers’][$i][‘password’] = yourpasswordB‘;
$cfg[‘Servers’][$i][‘AllowNoPassword’] = false;

/* End of servers configuration */

$cfg[‘DefaultLang’] = ‘en-utf-8’;
$cfg[‘ServerDefault’] = 1;
$cfg[‘UploadDir’] = ”;
$cfg[‘SaveDir’] = ”;

/* rajk – for blobstreaming */
$cfg[‘Servers’][$i][‘bs_garbage_threshold’] = 50;
$cfg[‘Servers’][$i][‘bs_repository_threshold’] = ’32M’;
$cfg[‘Servers’][$i][‘bs_temp_blob_timeout’] = 600;
$cfg[‘Servers’][$i][‘bs_temp_log_threshold’] = ’32M’;

Next go to the WAMP server services panel and select phpMyAdmin

A login screen will appear as shown below – enter your login details as:

Username :Root

Password: yourpasswordB

Login Screen for phpMyAdmin

You will then be taken to the phpMyAdmin administration screen where you see you have logged in a root@localhost if all has gone well – this is the screen you normally go to when no login routine is in place.

admin screen phpmyadmin

Next step creating logins

3 thoughts on “Creating a login screen in phpMyAdmin”

  1. great info. seen in other websites.
    but it doesn’t work for me.
    I get : #1045 Can’t login to the MySQL Serveer
    i am using myphpadmin3.5.1
    any reason why this is happening?
    hope you can email me 🙂

Comments are closed.