MySql.Data.MySqlClient.MySqlException:“主机 localhost 不支持 SSL 连接." [英] MySql.Data.MySqlClient.MySqlException: “The host localhost does not support SSL connections.”

查看:43
本文介绍了MySql.Data.MySqlClient.MySqlException:“主机 localhost 不支持 SSL 连接."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 MySql.Data 8.08 和 .NET Core 连接到 MySql 5.7.18但正在抛出以下异常:

I use MySql.Data 8.08 and .NET Core to connect to MySql 5.7.18 but following exception is being thrown:

MySql.Data.MySqlClient.MySqlException:主机 localhost 不支持 SSL 连接."

如何处理?

推荐答案

我今天从 MySql.Data 7.0.7 迁移到 8.0.8 时遇到了同样的问题.我能够继续在连接字符串中添加SslMode=none".

I had the same problem today when moving from MySql.Data 7.0.7 to 8.0.8. I was able to move forward adding the "SslMode=none" in the connection string.

你会得到类似的结果:

server={0};user id={1};password={2};persistsecurityinfo=True;port={3};database={4};SslMode=none

(用您的数据库详细信息替换值)

(replacing the values with your database details)

这篇关于MySql.Data.MySqlClient.MySqlException:“主机 localhost 不支持 SSL 连接."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆