Apex.MySqlClient
0.1.0-preview.3
dotnet add package Apex.MySqlClient --version 0.1.0-preview.3
NuGet\Install-Package Apex.MySqlClient -Version 0.1.0-preview.3
<PackageReference Include="Apex.MySqlClient" Version="0.1.0-preview.3" />
<PackageVersion Include="Apex.MySqlClient" Version="0.1.0-preview.3" />
<PackageReference Include="Apex.MySqlClient" />
paket add Apex.MySqlClient --version 0.1.0-preview.3
#r "nuget: Apex.MySqlClient, 0.1.0-preview.3"
#:package Apex.MySqlClient@0.1.0-preview.3
#addin nuget:?package=Apex.MySqlClient&version=0.1.0-preview.3&prerelease
#tool nuget:?package=Apex.MySqlClient&version=0.1.0-preview.3&prerelease

Apex MySQL and MariaDB client
Apex.MySqlClient is a direct MySQL protocol driver for .NET 10 and .NET 11.
Connect and pool
The driver accepts mysql:// and mariadb:// URIs, keyword connection strings,
explicit options, and standard MYSQL_* environment variables.
MySqlConnectOptions options = MySqlConnectOptions.Parse(
"mysql://app:secret@localhost:3306/app?sslMode=required");
await using MySqlPool pool = MySqlPool.Create(
options,
new SqlPoolOptions { MaxSize = 20 });
SqlRowSet rows = await pool.QueryAsync(
"SELECT id, message FROM messages WHERE id = ?",
SqlParameters.Create(42));
Supported features
- Text and binary query protocols, prepared statements, ordered batches, transactions, and paged cursors.
- Buffered
SqlRowSet, safeStreamAsync, and borrowedISqlRowReaderresults. - Multiple result sets and optional multi-statement execution.
mysql_native_password,caching_sha2_password,sha256_password, and opt-inmysql_clear_passwordauthentication.- Preferred or required TLS, CA and identity verification, client certificates, certificate callbacks, and SHA-2 RSA key exchange.
- Active query cancellation with
KILL QUERY, connection reset, ping, session variables, connection attributes, and bounded string caching. - Matched-row or changed-row semantics, last insert IDs, warning counts, server status, and server information messages.
- Opt-in
LOAD DATA LOCAL INFILEand NativeAOT-compatible options and codecs.
Prepared batches
await using ISqlConnection connection = await pool.GetConnectionAsync();
await using ISqlPreparedStatement insert = await connection.PrepareAsync(
"INSERT INTO messages(message) VALUES (?)");
IReadOnlyList<SqlCommandResult> results = await insert.ExecuteBatchAsync(
[SqlParameters.Create("first"), SqlParameters.Create("second")]);
MySQL returns complete result sets rather than fetch portals. OpenCursorAsync
pages a backpressured wire reader and pins the connection until the cursor is
exhausted or disposed. PipeliningLimit controls how many independent commands
may be in flight; its conservative default is one.
Security and cancellation
MySqlSslMode.Preferred negotiates TLS when offered. Required, VerifyCa, and
VerifyIdentity enforce progressively stronger checks. SHA-2 full
authentication sends a clear password only over TLS; without TLS, configure a
trusted PEM server key or explicitly enable AllowPublicKeyRetrieval.
Cancellation uses a short-lived authenticated connection to issue KILL QUERY.
If cancellation cannot be delivered, the physical command connection is closed
instead of being returned to a pool in an uncertain protocol state.
LOAD DATA LOCAL INFILE is disabled by default. Enable it only for a trusted
server because the server selects the requested local path.
Type support
Signed and unsigned integers, YEAR, BIT, floating point, DECIMAL, strings,
ENUM, SET, binary/blob values, dates, times, timestamps, JSON, geometry, and
vector payloads are supported in text and binary rows. Provider-specific values
include MySqlDecimal, MySqlServerVersion, MySqlColumnMetadata, and
MySqlCommandInfo.
Typed access includes BigInteger, Int128, UInt128, Half, BitArray,
IPAddress, PhysicalAddress, JsonElement, DateOnly, TimeOnly, and
TimeSpan. Zero dates can throw, map to null, or map to the corresponding .NET
minimum through ZeroDateBehavior.
Server compatibility
The active integration matrix covers MySQL 8.4 and 9.6 and MariaDB 11.8. Set
MYSQL_IMAGE to select a local test image.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net11.0 is compatible. |
-
net10.0
- Apex.SqlClient (>= 0.1.0-preview.3)
- System.IO.Hashing (>= 10.0.11)
-
net11.0
- Apex.SqlClient (>= 0.1.0-preview.3)
- System.IO.Hashing (>= 10.0.11)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Apex.MySqlClient:
| Package | Downloads |
|---|---|
|
Apex.SqlClient.AzureIdentity
Microsoft Entra authentication for Apex drivers |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-preview.3 | 71 | 8/17/2026 |
| 0.1.0-preview.2 | 77 | 8/16/2026 |
| 0.1.0-preview.1 | 70 | 8/16/2026 |