Phpmyadmin does not need a password to log on.

Source: Internet
Author: User
This article explains in detail how to set phpmyadmin logon without a password. Phpmyadmin does not need a password to log on:

Run phpmyadmin in the latest version. after installing phpmyadmin, enter the username root and click log on. because I am local, the root account does not have a password, and the access is rejected.

After reading the permission settings, there is no problem, and no good answer is found on the internet. it is also the root trace code. The original configuration file config. default. php contains the following sentence:

$cfg['Servers'][$i]['AllowNoPasswordRoot'] = false;

In libraries/common. inc. php's 886 lines verify the password. if it is false, the password cannot be blank if the user name is root. Otherwise, the password is not verified. by default, the password is flase, change it to true.

I think this may be for the sake of security. people must set the root password. haha, but I think it is inconvenient during the test. Generally, local root users are empty.

In fact, he can change the prompt statement, saying that your root password is blank and logon is not allowed at the current security level. he can change the settings at XXX, which may be clear, it is too difficult to find the reason why a single access is rejected.

Method 2

./After phpmyadmin is entered, modify the user permission to allow empty password login.

Method 3

By default, empty phpmyadmin password logon is disabled. this line is mainly controlled by two global variables in the configuration file libraries/config. default. php. the code is as follows:

$cfg['Servers'][$i]['nopassword'] = false; $cfg['Servers'][$i]['AllowNoPassword'] = false;

If these two variables are modified to True, phpmyadmin will allow empty logon. that is, the code in libraries/config. default. php is modified as follows:

$cfg['Servers'][$i]['nopassword'] = true; $cfg['Servers'][$i]['AllowNoPassword'] = true;

The code is as follows:

$cfg['Servers'][$i]['password'] = '';

Set the connection password of the database tutorial to an empty password.

The above is the phpmyadmin setting method that does not require a password for logon. For more information, see PHP Chinese network (www.php1.cn )!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.