This is an ADO.NET data
provider for MySQL and other compatible servers including MariaDB.
It provides implementations of
DbConnection
, DbCommand
, DbDataReader
, DbTransaction
—the classes
needed to query and update databases from managed code.
Complete documentation is available at the MySqlConnector Documentation Website.
This library outperforms MySQL Connector/NET (MySql.Data
) on benchmarks:
(Client: MySqlConnector 2.3.1, MySql.Data 8.2.0, Ubuntu 23.04, .NET 8.0; Server: Azure Database for MySQL 8.0.34, TLS 1.2)
This library is compatible with many MySQL-compatible servers, including MySQL 5.5 and newer and MariaDB 10.x and newer. MySql.Data only supports MySQL Server.
This library fixes dozens of outstanding bugs in Connector/NET.
This library implements the latest ADO.NET APIs, from async (introduced in .NET Framework 4.5), through DbBatch
(.NET 6.0) and DbDataSource
(.NET 7.0).
This library is MIT-licensed and may be freely distributed with commercial software. Commercial software that uses Connector/NET may have to purchase a commercial license from Oracle.
This library is compatible with popular .NET ORMs including:
For Entity Framework support, use:
For ASP.NET Core health checks, use:
Install the latest .NET.
To build and run the tests, clone the repo and execute:
dotnet restore
dotnet test tests\MySqlConnector.Tests
To run the integration tests, see the instructions.
The goals of this project are:
Cloning the full API of Connector/NET is not a goal of this project, although it will try not to be gratuitously incompatible. For typical scenarios, migrating to this package should be easy.
This library is licensed under the MIT License.
If you'd like to contribute to MySqlConnector, please read our contributing guidelines.
Development of MySqlConnector is supported by: