首先输入以下指令:
sudo cat /etc/mysql/debian.cnf
参考上一篇博客登录账户
https://blog.csdn.net/lanshi00/article/details/100155960
找那个账户 登录进去,输入如下命令
use mysql;
// 下面这句命令有点长,请注意。
update mysql.user set authentication_string=password('你的密码') where user='root' and Host ='localhost';
update user set plugin="mysql_native_password";
flush privileges;
quit;
完美
参考博客https://blog.csdn.net/qq_38737992/article/details/81090373