Open CMD first, stop the mysql service
net stop mysql
Enter the mysql installation directory under the bin folder, and then enter
Skip password detection
And then in addition a new open a cmd window
Input mysql and return can to root access into mysql
update user set password=password("newPassword") where user="root";
If there is no error message, the password can be changed successfully.