Home > Database > phpMyAdmin > body text

How to clear phpmyadmin login password and log in without password

王林
Release: 2019-12-13 14:30:33
Original
3220 people have browsed it

How to clear phpmyadmin login password and log in without password

phpmyadmin connects to the mysql database. For security reasons, empty passwords are not allowed to connect to the database by default. Because databases are generally set up for password access, but if it is only used for testing in the local environment, you need to fill in the password every once in a while, which is not very convenient.

If you have not modified the configuration and use an empty password to log in, phpmyadmin will return an error message:

Login without a password is forbidden by configuration (see AllowNoPassword)

We can modify the configuration file of phpmyadmin and set it to use an empty password to connect to the database.

The configuration is modified as follows:

For example: the database account is root and the password is empty

Open the libraries/config.default.php file in the phpmyadmin installation directory and find the corresponding Configuration, just modify it according to the following values.

// MySQL user
$cfg['Servers'][$i]['user'] = 'root';

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

// Whether to try to connect without password
$cfg['Servers'][$i]['nopassword'] = true;

// whether to allow login of any user without a password
$cfg['Servers'][$i]['AllowNoPassword'] = true;
Copy after login

Recommended related articles and tutorials: phpmyadmin tutorial

The above is the detailed content of How to clear phpmyadmin login password and log in without password. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template