1.mysql -uroot
2.use mysql
3.UPDATE user SET Password=PASSWORD('123456') where USER='root';
4.FLUSH PRIVILEGES;
5.quit
6.mysql -uroot -p
7.输入123456成功