MySQL新版默认使用caching_sha2_password作为身份验证插件,而旧版是使用mysql_native_password。
当连接MySQL时报错“plugin caching_sha2_password could not be loaded”时,可换回旧版插件。
mysql -hlocalhost -uroot -p123456 //进入数据库
use mysql;
ALTER USER [email protected] IDENTIFIED WITH mysql_native_password BY ‘123456‘; //123456是密码
FLUSH PRIVILEGES
原文地址:https://www.cnblogs.com/maluscalc/p/10840162.html
时间: 2024-10-07 18:31:37