Connector/NET supports TLS protocol versions TLSv1, TLSv1.1, TLSv1.2, and TLSv1.3. A new connection-string option,
tlsversion, permits the restriction of a connection to a single version or to a list with any combination of the four supported TLS versions (see Options for Both Classic MySQL Protocol and X Protocol).
Known issue: Both .NET Core 3.0 (cross platform) and .NET Framework 4.8 (windows only) added support for TLSv1.3. Be sure to confirm that the platform operating system running your application also supports TLSv1.3 before using it exclusively for connections. (Bug #30225427)
Support for DNS Service (SRV) records now provides an alternative to specifying individual hosts in the connection string. Instead, a single DNS domain can map to multiple targets (servers) using SRV address records. Each SRV record includes the host name, port, priority, and weight. For .NET applications using X Protocol, a new URI scheme of
mysqlx+srv://enables connections to share the query load when a single DNS domain is mapped to multiple servers (see Connections Using DNS SRV Records).
Similarly, the new
dns-srvconnection-string option also enables DNS SRV lookups for connections using either the classic MySQL protocol or X Protocol. The DNS SRV feature is disabled by default. For usage information, see Options for Both Classic MySQL Protocol and X Protocol.
Known Issue: The
MySql.Data.dllpackage from the NuGet gallery is missing libraries needed by .NET Framework projects (.NET Core projects are not affected). To enable this feature, download the no-install version of MySQL Connector/NET (
mysql-connector-net-8.0.19.msi) from https://dev.mysql.com/downloads/connector/net/ and then add
v4.5.2\MySql.Data.dllas a reference to your project. No other references are required if all items remain in the same location.
When creating a new connection using classic MySQL protocol, multiple hosts can be tried until a successful connection is established. A list of hosts can be given in a connection string, with or without priorities.
// Example with priority server=(address=220.127.116.11:3305,priority=60),(address=localhost:3306,priority=100); // Example without priority and with multiple ports host=10.10.10.10:3306,18.104.22.168:3305,localhost:3306;uid=test;password=xxxx;
If the priority is not included, or if multiple hosts have the same priority, Connector/NET selects a host at random. The same random selection behavior also applies to connections made using X Protocol, which previously selected hosts sequentially when no priority was specified.
Clone connections did not process all connection settings as expected. (Bug #30502718)
Connector/NET files displayed an unlikely date after the NuGet package containing them was installed in a project. (Bug #30471336, Bug #97390)
The inclusion of the
System.Resources.Extensionsdependency was transient and now is removed from the
MySql.DataNuGet package. (Bug #30421657, Bug #97218)