mysql -uroot -p update mysql.user set authentication_string=password('新密码') where user='root'; flush privileges;