mysql -uroot -p update mysql.user set authentication_string=password(‘新密码‘) where user=‘root‘; flush privileges;
MySQL 5.7修改root密码
原文:https://www.cnblogs.com/ilovejesus/p/12504554.html