1、用root用户登录 2、修改密码命令 update mysql.user set authentication_string=password(‘the_password’) where user=’root’; set password=password(‘the_password’);