1、切换数据库
use mysql
2、查看加密的方式
show variables like 'default_authentication_plugin';
3、查看本地mysql用户的信息
select host,user,plugin from mysql.user;
4、修改加密方式
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root';