MySQL8.0之后的加密规则为caching_sha2_password.而在此之前的加密规则为mysql_native_password。
将加密规则改回mysql_native_password即可。
alter user 'root'@'localhost' identified with mysql_native_password by '123456';
MySQL8.0更新后,默认加密规则改为caching_sha2_password。若需切换回mysql_native_password,可通过ALTER USER语句实现。这适用于希望保持旧加密方式的场景。
MySQL8.0之后的加密规则为caching_sha2_password.而在此之前的加密规则为mysql_native_password。
将加密规则改回mysql_native_password即可。
alter user 'root'@'localhost' identified with mysql_native_password by '123456';
3561
3388
322
2万+
736
1030
1392
610
1712
1531
593
946
3249

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