net stop mysql
net start mysql
mysql -uroot -p
-- 输入密码
alter user 'root'@'localhost' identified with mysql_native_password;
alter user 'root'@'localhost' identified by '123456';
1
2
3
4
5
6
如果不设置,则在修改账号验证方式时会报错ERROR 1524 (HY000): Plugin ‘mysql_native_password’ is not loaded