does not support SSL connections

语言:C#
开发工具:Visual Studio 2017

问题场景介绍:
nuget引用的MySql.Data版本是6.10.5,MySQL的数据库连接串如下:

Server=xxx;Database=xxx;User=xxx;Password=xxx;Port=3306;CharSet=utf8;Allow User Variables=True

可以正常访问MySQL数据库

更新nuget,MySql.Data版本是8.0.11,报错The host xxx does not support SSL connections.

解决方案:连接字符串添加SslMode=none;
修改后的数据库连接串如下:

Server=xxx;Database=xxx;User=xxx;Password=xxx;Port=3306;CharSet=utf8;Allow User Variables=True;SslMode=none;

猜你喜欢

转载自blog.csdn.net/u014654707/article/details/81053199