1、修改权限
grant all privileges on *.* to root@'%' with grant option;
2、刷新
flush privileges;
3、mysql caching_sha2_password cannot be loaded问题解决
alter user 'root'@'%' identified with mysql_native_password by '你的密码';
或
alter user 'root'@‘localhost' identified with mysql_native_password by 'Admin@123';
再执行:
flush privileges;