Auto-login phpMyAdmin

You can simply post the username in a field named pma_username and the password in pma_password. Or, if you're using http auth mode you can create a link with username and password like http://user:[email protected]/phpmyadmin/...


Edit config.inc.php

Location : /etc/phpmyadmin/config.inc.php

Find for the blow code

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

And replace the line of code by blow code

$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'your_password';

If your password null or '' the uncomment the blow line

//$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;

to

$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;

then it will work fine !


Add code in config.inc.php below of /* Authentication type */. It exists in the root folder

$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = ''; 

config.inc.php

/* Authentication type */

//$_SERVER["REMOTE_ADDR"] == '::1' (**ipv6**)
//$_SERVER["REMOTE_ADDR"] == '127.0.0.1' (**ipv4**)

if ($_SERVER["REMOTE_ADDR"] == '::1') {
    $cfg['Servers'][$i]['auth_type'] = 'config';
    $cfg['Servers'][$i]['user'] = 'user';
    $cfg['Servers'][$i]['password'] = 'password';
} else {
    $cfg['Servers'][$i]['auth_type'] = 'cookie';
}