MySql8修改root密码,修改用户名

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;        //  刷新权限

 

posted @ 2023-05-22 15:24  补码  阅读(239)  评论(0编辑  收藏  举报