在Mysql 配置文件my.ini里加skip-grant-tables
重启mysql
update mysql.user set password='' where user='root' and host='localhost';
flush privileges;
quit
去掉skip-grant-tables