sudo mysql -u root -p 回车 先登进去mysql
use mysql
update user set authentication_string='' where user = 'root';
alter user 'root'@'localhost' identified by 'your password';
输入上述的指令后即可解决问题
sudo mysql -u root -p 回车 先登进去mysql
use mysql
update user set authentication_string='' where user = 'root';
alter user 'root'@'localhost' identified by 'your password';
输入上述的指令后即可解决问题