MySQL 5.7.13 reset root password: 1.my.nin file in [mysqld] under Add skip-grant-tables2.cmd:net start Mysql-mysql-use MySQL; -update user SET Authentication_string=password (newpassword) WHERE user=root; -flush privileges; -quit;3. Landing
MySQL 5.7.13 reset root password: 1.my.nin file added "Skip-grant-tables" under [Mysqld] 2.cmd:net start Mysql->mysql->use mysql;-> UPDATE user SET Authentication_string=password ("NewPassword") WHERE user= ' root ';->flush privileges;->quit;3. When landing, will my.min file "skip-grant-tables" Delete login mysql-u user-p password; If logged in error 1820, login Mysql-u-P Enter: input mysql> SET PASSWORD = PASSWORD (' 123456 '); Create User: Yzkj;update user set Authentication_string=password ("123456") where user= "yzkj"; grant all on hzx.* to ' YZ KJ ' @ ' localhost '; Create user text;update user set Authentication_string=password ("123456") where user= "text"; Grant all text.* to ' text ' @ ' localhost '; 3. Refresh the database (be sure to remember to refresh) Mysql>flush privileges; quitmysql-uyzkj-p123456 Success!
Mysql5.7.13 forgot password and create user