当前位置:Gxlcms > 数据库问题 > 000-MySQL初始化root用户密码

000-MySQL初始化root用户密码

时间:2021-07-01 10:21:17 帮助过:19人阅读

PASSWORD FOR root@localhost = PASSWORD(MyNewPass);

MySQL 5.7.6 及之后版本:

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;

 

000-MySQL初始化root用户密码

标签:wpa   class   mysql初始化   expired   密码   and   roo   mys   cal   

人气教程排行