不要密码登录MySQL: sudo mysql -uroot
修改密码:密码修改为123456
use mysql;
update mysql.user set authentication_string=password('123456') where user='root' and Host ='localhost';
update user set plugin="mysql_native_password";
flush privileges;
quit;
然后就可以了。
不要密码登录MySQL: sudo mysql -uroot
修改密码:密码修改为123456
use mysql;
update mysql.user set authentication_string=password('123456') where user='root' and Host ='localhost';
update user set plugin="mysql_native_password";
flush privileges;
quit;
然后就可以了。