Home > Article > Backend Development > The real reason why phpmyadmin access is denied_PHP Tutorial
I just downloaded the latest version of phpmyadmin
After installing it, enter the username root and click login (because I am local, so root does not have a password)
The result is that the error of access denied is always reported
After checking There is nothing wrong with setting permissions.
I couldn’t find a good answer online.
It’s the root code. It turns out there is a sentence in the configuration file:
$cfg['Servers'][$i][ 'AllowNoPasswordRoot'] = false;
Verified it at line 886 of libraries/common.inc.php
If it is false, if the username is the root user, the password cannot be empty, otherwise it will not For verification, it is false by default, just change it to true.
I think this may be because for the sake of security, people must set a root password, haha, but I think it is a bit wrong during the test Convenient, generally the local root user is empty
Otherwise, he can change the prompt statement, saying that your root password is empty and login is not allowed according to the current security level
You can go to XXX to set the settings Change it so that you may understand better. It is too difficult to find the reason for a single access being denied!