use mysql; --将字段置为空 update user set authentication_string='' where user='root';--修改密码为root ALTER user 'root'@'localhost' IDENTIFIED BY 'root';
MySQL8.0修改root账号的密码
use mysql;
--将字段置为空
update user set authentication_string='' where user='root';
--修改密码为root
ALTER user 'root'@'localhost' IDENTIFIED BY 'root';2022-07-17