把密码设置为空:UPDATE mysql.user SET authentication_string='' WHERE user='root' and host='localhost'; 查看USER表:select host,user,plugin,authentication_string from mysql.user; 以caching_sha2_password加密方式设置密码修改密码:ALTER user 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'root'; 刷新:flush privileges;
如果出现如下问题,可参照下面得链接去解决。