我在我的C# netcoreapp2.1测试项目中有一个对MySql.Data的依赖,我使用它从数据库中查询测试数据,这在v8.0.25中工作得很好,但如果我升级到v.8.0.26,我会得到以下错误(没有任何其他代码更改)。
System.TypeInitializationException : The type initializer for 'Dev.Tests.Foo' threw an exception.
----> MySql.Data.MySqlClient.MySqlException : SSL Connection error.
----> System.AggregateException : One or more errors occurred. (The handshake failed due to an unexpected packet format.)
----> System.IO.IOException : The handshake failed due to an unexpected packet format.
我已经尝试在release notes中查找在此版本中可能发生的任何更改,但没有看到任何明显的东西(无论如何对我来说)。
还有没有人在升级MySql.Data时遇到过这个问题?
发布于 2021-09-21 15:41:13
如果您的主机不支持SSL,您可以使用SSL模式选项,无或必需。
连接字符串必须包含此选项,如;
"..OTHER_OPTIONS..;SSL Mode=None"
https://stackoverflow.com/questions/69271768
复制相似问题