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

2020-10-19  本文已影响0人  Neuroway

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;

上一篇下一篇

猜你喜欢

热点阅读