Home >Backend Development >PHP Tutorial >How to set up phpmyadmin without password login_PHP tutorial

How to set up phpmyadmin without password login_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-20 11:09:481072browse

php tutorial how to set up myadmin login without password

Download the latest version of phpmyadmin
After installation, enter the username root and click login (because I am local, so root does not have a password)
The result is that access denied errors are always reported
After checking the permission settings, there is no problem.
I couldn’t find a good answer online.
It’s the root code. It turns out that it is in the configuration file config There is a sentence in .default.php:
$cfg['Servers'][$i]['AllowNoPasswordRoot'] = false;
Verified it in line 886 of libraries/common.inc.php
If it is false, if the username is root, the password cannot be empty, otherwise no verification will be performed. It is false by default, just change it to true.
I think this may be him For the sake of security, people must set a root password, haha, but I think it is a bit inconvenient during testing. Generally, the local root user is empty
Alternatively, he can change the prompt statement and say it is you The root password is empty, and login is not allowed at the current security level
You can go to XXX and change the settings. This may make it clearer. It is too difficult to find the reason for a single access being denied!


Method 2

./phpmyadmin After entering, modify the user permissions to allow empty password login!

Method 3

The default phpmyadmin is empty Password login is prohibited. This behavior is mainly controlled through two global variables in the configuration file libraries/config.default.php, namely

The code is as follows:
$cfg['Servers'][ $i]['nopassword'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;


Just modify these two variables, assuming If set to True, phpmyadmin will allow logging in with an empty password, that is, modify the

code in libraries/config.default.php as follows:
$cfg['Servers'][$i][' nopassword'] = true;
$cfg['Servers'][$i]['AllowNoPassword'] = true;


At the same time, replace

with the following code:
$cfg['Servers'][$i]['password'] = '';

Set the database tutorial connection password to an empty password and it will be successful.


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/444772.htmlTechArticlephp tutorial myadmin does not require a password to log in. Download the latest version of phpmyadmin and enter the user name root after installation. Then click login (because I am local, so root does not have a password) End...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn