mysql 命令更改密码

 /**
 * 给root账户设置密码
 */
GRANT ALL ON *.* TO root@'::1' IDENTIFIED BY 'asdqwe456' WITH GRANT OPTION;
GRANT ALL ON *.* TO root@'localhost' IDENTIFIED BY 'asdqwe456' WITH GRANT OPTION;
GRANT ALL ON *.* TO root@'127.0.0.1' IDENTIFIED BY 'asdqwe456' WITH GRANT OPTION; 
GRANT ALL ON *.* TO root@'%' IDENTIFIED BY 'asdqwe456' WITH GRANT OPTION; 

其中asdqwe456填写上自己的密码

猜你喜欢

转载自blog.csdn.net/suyuaidan/article/details/44962927
今日推荐