目录
vi /etc/my.cnf[mysqld]skip-grant-tables/etc/init.d/mysqld restart
use mysql;update user set authentication_string=password(‘123456‘) where user=‘root‘ and host=‘localhost‘;flush privileges;/etc/init.d/mysqld restartvi /etc/my.cnf[mysqld]skip-grant-tables #delete/etc/init.d/mysqld restartALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘123456‘;