LoginLink.Connectors.Database.MySql
0.2.0
dotnet add package LoginLink.Connectors.Database.MySql --version 0.2.0
NuGet\Install-Package LoginLink.Connectors.Database.MySql -Version 0.2.0
<PackageReference Include="LoginLink.Connectors.Database.MySql" Version="0.2.0" />
<PackageVersion Include="LoginLink.Connectors.Database.MySql" Version="0.2.0" />
<PackageReference Include="LoginLink.Connectors.Database.MySql" />
paket add LoginLink.Connectors.Database.MySql --version 0.2.0
#r "nuget: LoginLink.Connectors.Database.MySql, 0.2.0"
#:package LoginLink.Connectors.Database.MySql@0.2.0
#addin nuget:?package=LoginLink.Connectors.Database.MySql&version=0.2.0
#tool nuget:?package=LoginLink.Connectors.Database.MySql&version=0.2.0
LoginLink.Connectors.Database.MySql
True BYO-DB MySQL storage backend for LoginLink.
A tenant admin points their tenant at a MySQL server they own and operate — Aiven, PlanetScale, RDS, Azure Database for MySQL, or a self-hosted instance (MySQL 8.0+ or a compatible fork). LoginLink never provisions, installs, or hosts the database itself; it only validates and uses a connection string the tenant supplies. SQLite remains the permanent, always-available default — this connector is an additive option, never a replacement.
Scope
Originally Tenant-scope only under LOCK-50 ("host.db/platform.db are
permanently SQLite"). Superseded (2026-09-17): Host and Platform scope are
both now supported too, so the control plane itself can run directly on
MySQL — a fresh /setup install, or a later migration via
PlatformScopeMigrationService.
Dialect notes
- Every integer-ish column is
BIGINT, never plainINT— matches the 8-byte width Dapper's dynamic-row(long)row.xcasts expect. - Every
TEXTcolumn that's part of aPRIMARY KEY,UNIQUE, or index isVARCHAR(n)instead — MySQL/InnoDB can't index aTEXT/BLOBcolumn without an explicit prefix length. Columns that are never indexed stayTEXT. - Indexes are declared inline inside each table's own
CREATE TABLE IF NOT EXISTSrather than as separateCREATE INDEXstatements — MySQL has noCREATE INDEX IF NOT EXISTS, so this sidesteps the idempotency problem entirely instead of needing a try/catch-per-index helper. ENGINE=InnoDBis explicit on every table, since this schema depends on real foreign-key enforcement (MyISAM silently ignoresFOREIGN KEYclauses).
Registration
builder.Services.AddMySqlStorage();
// AFTER app = builder.Build() (not inside ConnectorRegistry's own factory —
// see PostgresqlDatabaseConnector's registration in Program.cs for why):
var mysql = app.Services.GetRequiredService<MySqlDatabaseConnector>();
connectorRegistry.Register((IDatabaseConnector)mysql);
connectorRegistry.RegisterSchemaProvisioner(mysql.Name,
app.Services.GetRequiredService<MySqlSchemaProvisioner>());
Connection details
Read per-tenant via ITenantStorageCredentialsReader, never from
appsettings.json — each tenant's own host/port/database/username/password/SSL
mode are stored (encrypted) in platform.db.tenant_storage_credentials.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net8.0
- Dapper (>= 2.1.35)
- LoginLink.Abstractions (>= 1.2.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- MySqlConnector (>= 2.6.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.