phpMyAdmin configuration method for allowing null password logons
When you set the phpMyAdmin login password to a blank password, although you can enter MySQL with a blank password via the MySQL command line, you will not be able to log in when you re-login to phpmyadmin with a blank password.
This is because the default phpMyAdmin blank password login is forbidden, if you want to phpmyadmin a blank password to allow login, you need to modify phpMyAdmin related configuration.
If you want to allow phpMyAdmin to log in with a blank password, you will need to modify the libraries/config.default.php configuration file (if you are installing phpMyAdmin in the root directory config.inc.php).
The default phpMyAdmin blank password login is forbidden, and this behavior is mainly controlled by the two global variables in configuration file libraries/config.default.php, namely:
$cfg [' Servers '] [$i] [' nopassword '] = false; $cfg [' Servers '] [$i] [' allownopassword '] = false;
As long as you modify these two variables, set to True,phpmyadmin will allow a blank password to log in, that is, modify the libraries/config.default.php:
$cfg [' Servers '] [$i] [' nopassword '] = true; $cfg [' Servers '] [$i] [' allownopassword '] = true;
At the same time:
$cfg [' Servers '] [$i] [' password '] = ';
Setting the database connection password to a blank password is successful.
Precautions
When you allow phpMyAdmin to log in with an empty password, it is often only modified:
$cfg [' Servers '] [$i] [' allownopassword '] = true;
This is not right, empty password login phpMyAdmin still can not log on, must be the above three configuration variables are modified.
After modifying the phpMyAdmin profile config.default.php, log in again with a blank password phpMyAdmin sometimes still unable to log in.
This is because of the cookie cause, you need to close the original phpMyAdmin login window, reopen a new window, this time-space password login is no problem.