First, modify the my.ini file, and restart the mysql service
Find the configuration file my.ini, then open it, you can choose to use Notepad to open
After saving the restart mySQL: Open the Services window, find the service named mysql, shut down and restart
Second, modify mysql password
1. Go to the mysql database:
mysql> use mysql;
2. Set a new password to the root user, the blue part of their input:
mysql> update user set password=password("123") where user="root";
3. Refresh Database
mysql> flush privileges;
4. Exit mysql
mysql> quit;
Third, modify my.ini, and restart the mysql service
After changing for the better, and then modify the my.ini file, delete We just added "skip-grant-tables" line, save and exit and then restart the mysql service on it.