C#连接MySQL数据库时,提示SSL Authentication Error连接失败。
排除方法,在连接字符串中添加SslMode=none;AllowPublicKeyRetrieval=True;即可。
string conStr = string.Format($"Server=192.168.100.15;Database=数据库名称;User ID=用户名称;Password=登录密码;SslMode=none;AllowPublicKeyRetrieval=True;");
在C#尝试连接到MySQL数据库时遇到SSLAuthenticationError错误,可以通过在连接字符串中添加SslMode=none;AllowPublicKeyRetrieval=True;来解决此问题。这允许无SSL模式连接并启用公钥检索,从而成功建立连接。
3167

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



