MySQL forgets the password and cannot log on again. Use the command to change the new password.
If you forget the password, MySQL cannot log on. You can use the command to change the new password and log on again: 1. back up my. ini2. in my. in the ini field, [mysqld] # socket = mysqlskip-grant-tables to save my. close the ini file and restart mysql3. enter your mysql installation directory (for example, my directory is d: \ software \ mysql \ MySQL Server 5.6 \ bin) and enter d in the command line: press enter to enter disk d and then enter: cd: "d: \ software \ mysql \ MySQL Server 5.6 \ bin" Press ENTER 4. enter the SQL command mysql-uroot-pENTER PASSWORD: Press enter directly without entering anything show databases; note that there must be a semicolon, and press enter to see all your database files to see if it is correct to use mysqlupdate mysql. user set password = PASSWORD ('enter your password') where User = 'root'; flush privileges; quit press enter to enter the database without permission and reset the password