1. Locate the My.ini configuration file in the MySQL installation directory, open it, and add the Skip-grant-tables in the location as shown, save
2. Open cmd in MySQL installation directory, enter command mysql-uroot-p without entering password, enter
If an error occurs, if the computer finds the service, shuts down and re-opens MySQL, you can enter the above command again to enter MySQL normally
3. Continue to enter the following command to change the password
Use MySQL;
Update user set Password=password (' 12345 ') where user= ' root ';
If the following error occurs, a version issue
Change the command, enter update mysql. User set Authentication_string=password (' root ') where user= ' root ';
4. Delete or comment out the Skip-grant-tables statement under the My.ini file and reenter the changed password to enter phpadmin normally.
Phpadmin forgot to login password after operation