when I click the localhost/phpmyadmin it directly goes inside without asking login in wamp.I want to ask for login in phpmyadmin and local.
Please set password for root user and also create database user,so when you open phpmyadmin it will ask for login and then allowed to access.
Look in the config.inc.php
file in youy phpmyadmin
folder and change
$cfg['Servers'][$i]['AllowNoPassword'] = true;
with
$cfg['Servers'][$i]['AllowNoPassword'] = false;
Then you'll have to authenticate using your default login and password (usually "root" and no password). If you'd like to change these values, edit the following lines in the same file :
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
Amend the config.inc.php file to have these values and phpMyAdmin will throw a login dialog.
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['AllowNoPassword'] = false;