打开cmd,打开mysql后,分别执行三段代码:
1.
alter user root@localhost identified by '你的密码' password expire never;
2.
alter user root@localhost identified with mysql_native_password by '你的密码';
3.
flush privileges; // 刷新权限
最后输入exit退出mysql,再尝试连接就可以成功啦~
打开cmd,打开mysql后,分别执行三段代码:
alter user root@localhost identified by '你的密码' password expire never;
alter user root@localhost identified with mysql_native_password by '你的密码';
flush privileges; // 刷新权限
最后输入exit退出mysql,再尝试连接就可以成功啦~