use mysql;
update user set authentication_string='' where user='root'; // root设为空
ALTER user 'root'@'localhost' IDENTIFIED BY 'root'; // root密码设为root
flush privileges; // 刷新权限
use mysql;
update user set user =‘zk’ where user =‘root’;
flush privileges; // 刷新权限
标签:set,MySql8,flush,修改,user,mysql,root From: https://www.cnblogs.com/GEEK-ZHAO/p/17420746.html