MySqlConnector 2.1.2
About
MySqlConnector is an ADO.NET data provider for MySQL, MariaDB, Amazon Aurora, Azure Database for MySQL and other MySQL-compatible databases.
More documentation is available at the MySqlConnector website.
How to Use
// set these values correctly for your database server
var builder = new MySqlConnectionStringBuilder
{
Server = "your-server",
UserID = "database-user",
Password = "P@ssw0rd!",
Database = "database-name",
};
// open a connection asynchronously
using var connection = new MySqlConnection(builder.ConnectionString);
await connection.OpenAsync();
// create a DB command and set the SQL statement with parameters
using var command = connection.CreateCommand();
command.CommandText = @"SELECT * FROM orders WHERE order_id = @OrderId;";
command.Parameters.AddWithValue("@OrderId", orderId);
// execute the command and read the results
using var reader = await command.ExecuteReaderAsync();
while (reader.Read())
{
var id = reader.GetInt32("order_id");
var date = reader.GetDateTime("order_date");
// ...
}
Key Features
- Full support for async I/O
- High performance
- Supports .NET Framework, .NET Core, and .NET 5.0+
Main Types
The main types provided by this library are:
MySqlConnection(implementation ofDbConnection)MySqlCommand(implementation ofDbCommand)MySqlDataReader(implementation ofDbDataReader)MySqlBulkCopyMySqlBulkLoaderMySqlConnectionStringBuilderMySqlConnectorFactoryMySqlDataAdapterMySqlExceptionMySqlTransaction(implementation ofDbTransaction)
Related Packages
- Entity Framework Core: Pomelo.EntityFrameworkCore.MySql
- Logging: log4net, Microsoft.Extensions.Logging, NLog, Serilog
Feedback
MySqlConnector is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
No packages depend on MySqlConnector.
https://mysqlconnector.net/overview/version-history/
.NET Framework 4.5
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.4)
- System.Threading.Tasks.Extensions (>= 4.3.0)
- System.Diagnostics.DiagnosticSource (>= 5.0.1)
.NET Standard 2.1
- System.Diagnostics.DiagnosticSource (>= 5.0.1)
.NET Standard 2.0
- System.Threading.Tasks.Extensions (>= 4.3.0)
- System.Memory (>= 4.5.4)
- System.Diagnostics.DiagnosticSource (>= 5.0.1)
- System.Buffers (>= 4.5.1)
.NET 5.0
- No dependencies.
.NET Core 3.1
- System.Diagnostics.DiagnosticSource (>= 5.0.1)
.NET Framework 4.7.1
- System.Threading.Tasks.Extensions (>= 4.3.0)
- System.Memory (>= 4.5.4)
- System.Buffers (>= 4.5.1)
- System.Diagnostics.DiagnosticSource (>= 5.0.1)
.NET 6.0
- No dependencies.
.NET Framework 4.6.1
- System.Buffers (>= 4.5.1)
- System.Memory (>= 4.5.4)
- System.Threading.Tasks.Extensions (>= 4.3.0)
- System.Diagnostics.DiagnosticSource (>= 5.0.1)
| Version | Downloads | Last updated |
|---|---|---|
| 2.6.2 | 1 | 09/25/2026 |
| 2.6.1 | 1 | 09/25/2026 |
| 2.6.0 | 1 | 09/25/2026 |
| 2.5.0 | 1 | 09/25/2026 |
| 2.4.0 | 1 | 09/25/2026 |
| 2.3.7 | 1 | 09/25/2026 |
| 2.3.6 | 1 | 09/25/2026 |
| 2.3.5 | 1 | 09/25/2026 |
| 2.3.4 | 1 | 09/25/2026 |
| 2.3.3 | 1 | 09/25/2026 |
| 2.3.2 | 1 | 09/25/2026 |
| 2.3.1 | 1 | 09/25/2026 |
| 2.3.0 | 1 | 09/25/2026 |
| 2.2.7 | 1 | 09/25/2026 |
| 2.2.6 | 1 | 09/25/2026 |
| 2.2.5 | 1 | 09/25/2026 |
| 2.2.4 | 1 | 09/25/2026 |
| 2.2.3 | 1 | 09/25/2026 |
| 2.2.2 | 1 | 09/25/2026 |
| 2.2.1 | 1 | 09/25/2026 |
| 2.2.0 | 1 | 09/25/2026 |
| 2.1.13 | 1 | 09/25/2026 |
| 2.1.12 | 1 | 09/25/2026 |
| 2.1.11 | 1 | 09/25/2026 |
| 2.1.10 | 1 | 09/25/2026 |
| 2.1.9 | 1 | 09/25/2026 |
| 2.1.8 | 1 | 09/25/2026 |
| 2.1.7 | 1 | 09/25/2026 |
| 2.1.6 | 1 | 09/25/2026 |
| 2.1.5 | 1 | 09/25/2026 |
| 2.1.4 | 1 | 09/25/2026 |
| 2.1.3 | 1 | 09/25/2026 |
| 2.1.2 | 1 | 09/25/2026 |
| 2.1.1 | 1 | 09/25/2026 |
| 2.1.0 | 1 | 09/25/2026 |
| 2.0.0 | 1 | 09/25/2026 |
| 1.3.14 | 1 | 09/25/2026 |
| 1.3.13 | 1 | 09/25/2026 |
| 1.3.12 | 1 | 09/25/2026 |
| 1.3.11 | 1 | 09/25/2026 |
| 1.3.10 | 1 | 09/25/2026 |
| 1.3.9 | 1 | 09/25/2026 |
| 1.3.8 | 1 | 09/25/2026 |
| 1.3.7 | 1 | 09/25/2026 |
| 1.3.6 | 1 | 09/25/2026 |
| 1.3.5 | 1 | 09/25/2026 |
| 1.3.4 | 1 | 09/25/2026 |
| 1.3.3 | 1 | 09/25/2026 |
| 1.3.2 | 1 | 09/25/2026 |
| 1.3.1 | 1 | 09/25/2026 |
| 1.3.0 | 1 | 09/25/2026 |
| 1.2.1 | 1 | 09/25/2026 |
| 1.2.0 | 1 | 09/25/2026 |
| 1.1.0 | 1 | 09/25/2026 |
| 1.0.1 | 1 | 09/25/2026 |
| 1.0.0 | 1 | 09/25/2026 |
| 0.69.10 | 1 | 09/25/2026 |
| 0.69.9 | 1 | 09/25/2026 |
| 0.69.8 | 1 | 09/25/2026 |
| 0.69.7 | 1 | 09/25/2026 |
| 0.69.6 | 1 | 09/25/2026 |
| 0.69.5 | 1 | 09/25/2026 |
| 0.69.4 | 1 | 09/25/2026 |
| 0.69.3 | 1 | 09/25/2026 |
| 0.69.2 | 1 | 09/25/2026 |
| 0.69.1 | 1 | 09/25/2026 |
| 0.69.0 | 1 | 09/25/2026 |
| 0.68.1 | 1 | 09/25/2026 |
| 0.68.0 | 1 | 09/25/2026 |
| 0.67.0 | 1 | 09/25/2026 |
| 0.66.0 | 1 | 09/25/2026 |
| 0.65.0 | 1 | 09/25/2026 |
| 0.64.2 | 1 | 09/25/2026 |
| 0.64.1 | 1 | 09/25/2026 |
| 0.64.0 | 1 | 09/25/2026 |
| 0.63.2 | 1 | 09/25/2026 |
| 0.63.1 | 1 | 09/25/2026 |
| 0.63.0 | 1 | 09/25/2026 |
| 0.62.0 | 1 | 09/25/2026 |
| 0.61.0 | 1 | 09/25/2026 |
| 0.60.4 | 1 | 09/25/2026 |
| 0.60.3 | 1 | 09/25/2026 |
| 0.60.2 | 1 | 09/25/2026 |
| 0.60.1 | 1 | 09/25/2026 |
| 0.60.0 | 1 | 09/25/2026 |
| 0.59.2 | 1 | 09/25/2026 |
| 0.59.1 | 1 | 09/25/2026 |
| 0.59.0 | 1 | 09/25/2026 |
| 0.58.0 | 1 | 09/25/2026 |
| 0.57.0 | 1 | 09/25/2026 |
| 0.56.0 | 1 | 09/25/2026 |
| 0.55.0 | 1 | 09/25/2026 |
| 0.54.0 | 1 | 09/25/2026 |
| 0.53.0 | 1 | 09/25/2026 |
| 0.52.0 | 1 | 09/25/2026 |
| 0.51.1 | 1 | 09/25/2026 |
| 0.51.0 | 1 | 09/25/2026 |
| 0.50.0 | 1 | 09/25/2026 |
| 0.49.3 | 1 | 09/25/2026 |
| 0.49.2 | 1 | 09/25/2026 |
| 0.49.0 | 1 | 09/25/2026 |
| 0.48.2 | 1 | 09/25/2026 |
| 0.48.1 | 1 | 09/25/2026 |
| 0.48.0 | 1 | 09/25/2026 |
| 0.47.1 | 1 | 09/25/2026 |
| 0.47.0 | 1 | 09/25/2026 |
| 0.46.2 | 1 | 09/25/2026 |
| 0.46.1 | 1 | 09/25/2026 |
| 0.46.0 | 1 | 09/25/2026 |
| 0.45.1 | 1 | 09/25/2026 |
| 0.45.0 | 1 | 09/25/2026 |
| 0.44.1 | 1 | 09/25/2026 |
| 0.44.0 | 1 | 09/25/2026 |
| 0.43.0 | 1 | 09/25/2026 |
| 0.42.3 | 1 | 09/25/2026 |
| 0.42.2 | 1 | 09/25/2026 |
| 0.42.1 | 1 | 09/25/2026 |
| 0.42.0 | 1 | 09/25/2026 |
| 0.41.0 | 1 | 09/25/2026 |
| 0.40.4 | 1 | 09/25/2026 |
| 0.40.3 | 1 | 09/25/2026 |
| 0.40.2 | 1 | 09/25/2026 |
| 0.36.0 | 1 | 09/25/2026 |
| 0.35.0 | 1 | 09/25/2026 |
| 0.32.0 | 1 | 09/25/2026 |
| 0.30.0 | 1 | 09/25/2026 |
| 0.29.4 | 1 | 09/25/2026 |
| 0.29.2 | 1 | 09/25/2026 |
| 0.26.5 | 1 | 09/25/2026 |
| 0.26.4 | 1 | 09/25/2026 |
| 0.26.3 | 1 | 09/25/2026 |
| 0.26.2 | 1 | 09/25/2026 |
| 0.26.1 | 1 | 09/25/2026 |
| 0.26.0 | 1 | 09/25/2026 |
| 0.25.1 | 1 | 09/25/2026 |
| 0.25.0 | 1 | 09/25/2026 |
| 0.20.0 | 1 | 09/25/2026 |
| 0.19.5 | 1 | 09/25/2026 |
| 0.19.4 | 1 | 09/25/2026 |
| 0.19.3 | 1 | 09/25/2026 |
| 0.19.2 | 1 | 09/25/2026 |
| 0.16.2 | 1 | 09/25/2026 |
| 0.10.0 | 1 | 09/25/2026 |
| 0.9.0 | 1 | 09/25/2026 |
| 0.8.0 | 1 | 09/25/2026 |
| 0.7.4 | 1 | 09/25/2026 |
| 0.7.3 | 1 | 09/25/2026 |
| 0.7.2 | 1 | 09/25/2026 |
| 0.7.1 | 1 | 09/25/2026 |
| 0.7.0 | 1 | 09/25/2026 |
| 0.6.2 | 1 | 09/25/2026 |
| 0.6.1 | 1 | 09/25/2026 |
| 0.6.0 | 1 | 09/25/2026 |
| 0.5.0 | 1 | 09/25/2026 |
| 0.4.0 | 1 | 09/25/2026 |
| 0.3.0 | 1 | 09/25/2026 |
| 0.2.1 | 1 | 09/25/2026 |
| 0.2.0 | 1 | 09/25/2026 |
| 0.1.0 | 1 | 09/25/2026 |