1.service mysqld stop
2.vim /etc/my.cnf
添加skip-grant-tables
3.service mysqld start
4.查看systemctl status mysqld
5.mysql -uroot -p;
6.use mysql;
7.SET SQL_SAFE_UPDATES = 0;
8.update mysql.user set authentication_string=password('mima') where user='root';
9.SET SQL_SAFE_UPDATES = 1;
10.vim /etc/my.cnf
删除skip-grant-tables