1. administrator rights limit landing cmd;
2. Enter net stop mysql; then prompts. Service stop -> service is stopped;
3. Since mysqld -skip-grant-tables have been measured in failure mysql8.0 now use mysqld --console --skip-grant-tables --shared -memory this time the command prompt window in a locked state, we re-order administrator rights to open new cmd command prompt window
4. In the new command prompt window, type: MySQL-uroot--p Enter, press Enter to go directly when prompted for a password.
5. Input: use MySQL;
6. Enter: the ALTER the User 'root' @ 'localhost' IDENTIFIED by 'newpassword'; newpassword is the new password to be set.
7. If prompted to set up, enter: flush privileges;
8.mysql service start net start mysql; mysql stop service net stop mysql