MySQL更新到8版本之后,程序连接时报this authentication plugin is not supported 错误
解决方法
可能是以下两种方式导致的
方法一:
由于MySQL8的默认加密方式为caching_sha2_password,而之前版本的加密方式为mysql_native_password,所以可以通过修改MySQL 8的用户加密方式
alter user root@localhost identified with mysql_native_password by 'passwd';
解释:这行语句有两层含义,第一:修改root的密码为’ passwd’ ,摒弃原来的旧密码。第二:使用mysql_native_password对新密码进行编码。
alter user root@% identified with mysql_native_password by 'passwd';
如果修改后报this user requires mysql native password authentication
则修改My

最低0.47元/天 解锁文章
6万+

被折叠的 条评论
为什么被折叠?



