ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'
FLUSH PRIVILEGES
重启mysql服务,root密码修改为'password'
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'
FLUSH PRIVILEGES
重启mysql服务,root密码修改为'password'