Home  >  Article  >  Database  >  What should I do if phpmyadmin #1045 error cannot log in to the mysql server?

What should I do if phpmyadmin #1045 error cannot log in to the mysql server?

coldplay.xixi
coldplay.xixiOriginal
2020-07-21 14:54:172831browse

phpmyadmin #1045 error solution for unable to log in to the mysql server: modify the relevant code in the [/phpmyadmin/libraries/config.default.php] file to false to true, and log in with an empty password.

What should I do if phpmyadmin #1045 error cannot log in to the mysql server?

phpmyadmin #1045 error cannot be logged in to the mysql server solution:

1. At this time, you can try to use mysql The default empty password of the root account is used to log in to the database.

If you use a blank password to log in, an error occurs: Login with blank password is prohibited (see Allowing blank passwords). Then you need to modify the /phpmyadmin/libraries/config.default.php file, find the following two lines

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

, change the two false to true, and set $cfg['Servers '][$i]['password'] = ”;

After setting the configuration file in this way, phpmyadmin will allow logging in to the mysql database with an empty password.

2. If you still cannot log in to phpmyadmin with a blank password again, please clear the cookie or close the original phpmyadmin login window and log in with a blank password again.

If the blank password login is still displayed at this time If it is banned, try entering a few characters as the password to see if you can log in successfully.

After logging in to the mysql server, change the mysql password in phpmyadmin as soon as possible. Or change the mysql password on the SSH client: cd /usr/local/mysql/bin
Then execute the command:

./mysqladmin -u root -p passwordhttp://laser-mall.com/passwd

Related tutorial recommendations: phpmyadmin

The above is the detailed content of What should I do if phpmyadmin #1045 error cannot log in to the mysql server?. For more information, please follow other related articles on the PHP Chinese website!

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