修改MySQL中的用户密码的多种方式

ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';


UPDATE mysql.user SET authentication_string = PASSWORD('MyNewPass'), password_expired = 'N' WHERE User = 'root' AND Host = 'localhost';FLUSH PRIVILEGES;

你可能感兴趣的:(修改MySQL中的用户密码的多种方式)