1 /etc/init.d/mysql stop 2 3 4 vim /etc/my.cnf
添加
skip-grant-tables
5 mysql -u root 6 use mysql; 7 update user set password=PASSWORD("mynewpassword") where User='root'; 8 update user set plugin="mysql_native_password";
1 /etc/init.d/mysql stop 2 3 4 vim /etc/my.cnf
添加
skip-grant-tables
5 mysql -u root 6 use mysql; 7 update user set password=PASSWORD("mynewpassword") where User='root'; 8 update user set plugin="mysql_native_password";