ADO.NET drivers for MySQL

Unofficial Content
This documentation is valid for:

This article states what drivers can be or are used to connect to MySQL from .NET and .NET Core applications, and the benefits of each option.

Using the .NET Generator, as of GeneXus 17 upgrade 1, in the ADO.NET provider property you can choose between these options:

  • MySQLDriverCS
  • MySQL Connector

Using the .NET Core Generator, as of GeneXus 17 upgrade 1, MySQL Connector is used. (*)

MySQLDriverCS vs MySQL Connector

  Problems Benefits
MySQLDriverCS
  • Requires the installation of a MySQL Client, with different DLLs depending on the MySQL Version, 32 or 64 bits, etc. This causes issues or troubleshooting costs in different scenarios for development and deployment
  • It does not support UTF8 or Emojis
  • It has problems related to access memory. These are difficult to solve since the driver is not fully managed (interop with c++)   
  • Supports multiple data readers (Less memory consumption loading recordsets from the database (**))

 

MySQLConnector
  • Higher memory consumption loading recordsets from the database (**)

 

  • It is fully managed (It does not require any extra installation)
  • It is maintained by a broad and active open source community (Dec 2020)

(*) In previous versions, MySQL.Data provider was used. But given the lack of performance (2:1 compared to MySQL Connector), it is no longer used in GeneXus 17 Upgrade 1 or higher.

(**) The driver does not support multiple server cursors reading data at the same time. Therefore, when you nest reads, all data of the outer cursor has to be read first and loaded to memory, and then the nested cursor can start executing. More information at Performance and memory implications depending Drivers support for multiple data readers.