Skip to content

mysql-net/MySqlConnector

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
.ci
 
 
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Async MySQL Connector for .NET and .NET Core

This is an ADO.NET data provider for MySQL. 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.

Why Use This Library?

Async Support

This library implements true asynchronous I/O for database operations, without blocking (or using Task.Run to run synchronous methods on a background thread). This greatly improves the throughput of a web server that performs database operations.

Performance

This library outperforms MySQL Connector/NET (MySql.Data) on benchmarks:

Benchmark

(Client: MySqlConnector 2.2.0, Ubuntu 20.04, .NET 7.0; Server: Azure Database for MySQL 8.0.28, TLS 1.2)

Bug Fixes

This library fixes dozens of outstanding bugs in Connector/NET.

License

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.

ORMs

This library is compatible with popular .NET ORMs including:

For Entity Framework support, use:

Build Status

Appveyor Azure Pipelines NuGet
AppVeyor Azure Pipelines NuGet

Building

Install the latest .NET Core.

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.

Goals

The goals of this project are:

  1. .NET Standard support: It must run on the full .NET Framework and all platforms supported by .NET Core.
  2. Async: All operations must be truly asynchronous whenever possible.
  3. High performance: Avoid unnecessary allocations and copies when reading data.
  4. Lightweight: Only the core of ADO.NET is implemented, not EF or Designer types.
  5. Managed: Managed code only, no native code.
  6. Independent: This is a clean-room reimplementation of the MySQL Protocol, not based on Connector/NET.

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.

License

This library is licensed under the MIT License.

Contributing

If you'd like to contribute to MySqlConnector, please read our contributing guidelines.

Acknowledgements

Development of MySqlConnector is supported by:

Faithlife

Faithlife (View jobs)

Microsoft Azure

Azure Credits for Open Source