cmd下进入mysql mysql -uroot -p你的密码 1、mysql>flush privileges; 2、mysql>ALTER USER root@localhost IDENTIFIED BY '123456'; 3、修改成功