MySQL root password forget, view or modify the workaround:
1. Start the command line first
2. Run at the command line: taskkill/f/im Mysqld-nt.exe
3. Continue to run at the command line: Mysqld-nt--skip-grant-tables
4. Open a new command line run: mysql-u root (if you do not configure the bin environment variable for MySQL, you need to switch to the bin directory to execute this statement)
If you do not want to change the password, just want to see the original password. This statement can be executed at the command line
Select Host,user,password from mysql.user;//to view users and passwords
If you want to change the password, execute the following statement at the command line
Update Mysql.user set password= ' Here fill in the password you want to set ' where user= ' root ';
Here I set the blank password.
After you complete these operations, continue to run at the command line
taskkill/f/im mysqld-nt.exe;//Security, the first end, because now this is can be directly logged in with the mysql-u root
net start mysql;//start MySQL service
MySQL root password forgot, view or modify the workaround