Home  >  Article  >  Database  >  Solve the problem that phpMyAdmin cannot log in to MySQL and empty passwords are prohibited

Solve the problem that phpMyAdmin cannot log in to MySQL and empty passwords are prohibited

藏色散人
藏色散人forward
2021-08-10 14:25:044822browse

The following tutorial column of phpmyadmin will introduce to you the solution to the problem that phpMyAdmin cannot log in to the MySQL server/empty password login is prohibited. I hope it will be helpful to friends in need!

System: Windows

The error is as follows:


After consulting some information, Some methods are as follows:

Step1: Modify the following fields in config.default.php of F:\xampp\phpMyAdmin\libraries.

Step1:$cfg['Servers'][$i]['password'] = ''; //Modify this field to empty

         

Step2:$cfg['Servers'][$i]['nopassword'] = true;//Modify this field to true

             

Step3:$cfg['Servers'][$i]['AllowNoPassword'] = true;//Modify this field to true

         

#Step4: The root user can log in with a blank password. Remember to change the root user’s password.


But after modifying it, I still can’t log in. Another method is as follows:

Step1: Log in to phpMyAdmin using another super user’s account and password

Step2:

Step3: Choose to change the password


Step4: Fill in the password and Re-enter and click Execute. Don't click to generate a password! ! !


Step5: After the modification is successful, the following information will be displayed:


Step 6: The root user needs to have a user whose Host is localhost. (I don’t know why I failed to create a user using phpMyAdmin)

                            Create a new user in PHPMyAdmin: grant all privileges on *.* to 'root'@'localhost' identified by "newpassword" with grant option;


Step7: Change # in F:\xampp\phpMyAdmin\libraries\config.default.php

##                                                                                                                                                                                                                                                                                                      through ]['password'] = 'newpassword';

Where newpassword is the password of the root user. Restart Apache and mysqld.exe, and use the new account and password to log in to phpMyAdmin.

The above is the detailed content of Solve the problem that phpMyAdmin cannot log in to MySQL and empty passwords are prohibited. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete