mysql command to change password

 /**
 * 给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; 

where asdqwe456 fills in his own password

Guess you like

Origin blog.csdn.net/suyuaidan/article/details/44962927