# 修改密码安全度检测机制 set global validate_password.policy=0; set global validate_password.length=4; # 修改root密码 alter user 'root'@'localhost' identified by 'newpassword'; alter user 'root'@'%' identified by 'newpassword'; # 生效 flush privileges; 重启MySQL