# 登录mysql mysql -u root -p # 修改加密规则 mysql> ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '新密码'; #更新一下用户的密码 mysql> ALTER USER 'root'@'%' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #刷新权限 FLUSH PRIVILEGES;
# 登录mysql mysql -u root -p # 修改加密规则 mysql> ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '新密码'; #更新一下用户的密码 mysql> ALTER USER 'root'@'%' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; #刷新权限 FLUSH PRIVILEGES;