在使用.NET连接MySql时报了一个异常:
MySql.Data.MySqlClient.MySqlException:“Authentication method ‘caching_sha2_password’ not supported by any of the available plugins.”
解决方案如下:
1.修改my.ini文件中的配置信息
将default_authentication_plugin=caching_sha2_password
改为default_authentication_plugin=mysql_native_password
2.重启MySql服务
详细过程如下
SHOW GLOBAL VARIABLES;
SHOW VARIABLES LIKE 'default_authentication_plugin';
参考文章:
mysql 报错Authentication method ‘caching_sha2_password’ is not supported.