注意:mysql5.7 user表密码字段由password改为authentication_string
1、service mysql stop
2、mysqld_safe --skip-grant-tables --skip-networking &
3、mysql -u root
4、use mysql;
5、update user set password=PASSWORD("test") where User='root';
6、killall mysqld
7、service mysql start