1.cmd输入命令:mysql -u root -p
2.分别执行命令:use mysql;
select user,plugin from user where user='root';
3.分别执行命令:
alter user 'root'@'localhost' identified by 'root' password expire never;
alter user 'root'@'localhost' identified with mysql_native_password by 'root';
flush privileges;
4.正常链接数据库