进入数据库
mysql>update mysql.user set authentication_string=password('新密码放到这') where user='root' and Host = 'localhost';
mysql>update user set plugin="mysql_native_password";
mysql>use mysql
mysql>flush privileges;
mysql>quit
service mysql restart
mysql>update mysql.user set authentication_string=password('新密码放到这') where user='root' and Host = 'localhost';
mysql>update user set plugin="mysql_native_password";
mysql>use mysql
mysql>flush privileges;
mysql>quit
service mysql restart