Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Azure MySQL Flexible Server SDK for .NET. Database management for MySQL Flexible Server deployments.
.claude/skills/azure-resource-manager-mysql-dotnet/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 89% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 160% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 204% | 0% |
| case-18 | ✗→✓ | ▲ Improved | 108% | 0% |
| case-22 | ✓→✗ | ▼ Worse | 90% | 0% |
Azure Resource Manager SDK for managing MySQL Flexible Server deployments.
bashdotnet add package Azure.ResourceManager.MySql dotnet add package Azure.Identity
Current Version: v1.2.0 (GA) API Version: 2023-12-30
> Note: This skill focuses on MySQL Flexible Server. Single Server is deprecated and scheduled for retirement.
bashAZURE_SUBSCRIPTION_ID=<your-subscription-id> AZURE_RESOURCE_GROUP=<your-resource-group> AZURE_MYSQL_SERVER_NAME=<your-mysql-server>
csharpusing Azure.Identity; using Azure.ResourceManager; using Azure.ResourceManager.MySql; using Azure.ResourceManager.MySql.FlexibleServers; ArmClient client = new ArmClient(new DefaultAzureCredential());
Subscription
└── ResourceGroup
└── MySqlFlexibleServer # MySQL Flexible Server instance
├── MySqlFlexibleServerDatabase # Database within the server
├── MySqlFlexibleServerFirewallRule # IP firewall rules
├── MySqlFlexibleServerConfiguration # Server parameters
├── MySqlFlexibleServerBackup # Backup information
├── MySqlFlexibleServerMaintenanceWindow # Maintenance schedule
└── MySqlFlexibleServerAadAdministrator # Entra ID admincsharpusing System; using Azure.ResourceManager.MySql.FlexibleServers; using Azure.ResourceManager.MySql.FlexibleServers.Models; ResourceGroupResource resourceGroup = await client .GetDefaultSubscriptionAsync() .Result .GetResourceGroupAsync("my-resource-group"); MySqlFlexibleServerCollection servers = resourceGroup.GetMySqlFlexibleServers(); MySqlFlexibleServerData data = new MySqlFlexibleServerData(AzureLocation.EastUS) { Sku = new MySqlFlexibleServerSku("Standard_D2ds_v4", MySqlFlexibleServerSkuTier.GeneralPurpose), AdministratorLogin = "mysqladmin", AdministratorLoginPassword = Environment.GetEnvironmentVariable("MYSQL_ADMIN_PASSWORD") ?? throw new InvalidOperationException("MYSQL_ADMIN_PASSWORD is required"), Version = MySqlFlexibleServerVersion.Ver8_0_21, Storage = new MySqlFlexibleServerStorage { StorageSizeInGB = 128, AutoGrow = MySqlFlexibleServerEnableStatusEnum.Enabled, Iops = 3000 }, Backup = new MySqlFlexibleServerBackupProperties { BackupRetentionDays = 7, GeoRedundantBackup = MySqlFlexibleServerEnableStatusEnum.Disabled }, HighAvailability = new MySqlFlexibleServerHighAvailability { Mode = MySqlFlexibleServerHighAvailabilityMode.ZoneRedundant, StandbyAvailabilityZone = "2" }, AvailabilityZone = "1" }; ArmOperation<MySqlFlexibleServerResource> operation = await servers .CreateOrUpdateAsync(WaitUntil.Completed, "my-mysql-server", data); MySqlFlexibleServerResource server = operation.Value; Console.WriteLine($"Server created: {server.Data.FullyQualifiedDomainName}");
csharpMySqlFlexibleServerResource server = await resourceGroup .GetMySqlFlexibleServerAsync("my-mysql-server"); MySqlFlexibleServerDatabaseCollection databases = server.GetMySqlFlexibleServerDatabases(); MySqlFlexibleServerDatabaseData dbData = new MySqlFlexibleServerDatabaseData { Charset = "utf8mb4", Collation = "utf8mb4_unicode_ci" }; ArmOperation<MySqlFlexibleServerDatabaseResource> operation = await databases .CreateOrUpdateAsync(WaitUntil.Completed, "myappdb", dbData); MySqlFlexibleServerDatabaseResource database = operation.Value; Console.WriteLine($"Database created: {database.Data.Name}");
csharpMySqlFlexibleServerFirewallRuleCollection firewallRules = server.GetMySqlFlexibleServerFirewallRules(); // Allow specific IP range MySqlFlexibleServerFirewallRuleData ruleData = new MySqlFlexibleServerFirewallRuleData { StartIPAddress = System.Net.IPAddress.Parse("10.0.0.1"), EndIPAddress = System.Net.IPAddress.Parse("10.0.0.255") }; ArmOperation<MySqlFlexibleServerFirewallRuleResource> operation = await firewallRules .CreateOrUpdateAsync(WaitUntil.Completed, "allow-internal", ruleData); // Allow Azure services MySqlFlexibleServerFirewallRuleData azureServicesRule = new MySqlFlexibleServerFirewallRuleData { StartIPAddress = System.Net.IPAddress.Parse("0.0.0.0"), EndIPAddress = System.Net.IPAddress.Parse("0.0.0.0") }; await firewallRules.CreateOrUpdateAsync(WaitUntil.Completed, "AllowAllAzureServicesAndResourcesWithinAzureIps", azureServicesRule);
csharpMySqlFlexibleServerConfigurationCollection configurations = server.GetMySqlFlexibleServerConfigurations(); // Get current configuration MySqlFlexibleServerConfigurationResource config = await configurations .GetAsync("max_connections"); // Update configuration MySqlFlexibleServerConfigurationData configData = new MySqlFlexibleServerConfigurationData { Value = "500", Source = MySqlFlexibleServerConfigurationSource.UserOverride }; ArmOperation<MySqlFlexibleServerConfigurationResource> operation = await configurations .CreateOrUpdateAsync(WaitUntil.Completed, "max_connections", configData); // Common configurations to tune string[] commonParams = { "max_connections", "innodb_buffer_pool_size", "slow_query_log", "long_query_time" };
csharpMySqlFlexibleServerAadAdministratorCollection admins = server.GetMySqlFlexibleServerAadAdministrators(); MySqlFlexibleServerAadAdministratorData adminData = new MySqlFlexibleServerAadAdministratorData { AdministratorType = MySqlFlexibleServerAdministratorType.ActiveDirectory, Login = "aad-admin@contoso.com", Sid = Guid.Parse("<entra-object-id>"), TenantId = Guid.Parse("<tenant-id>"), IdentityResourceId = new ResourceIdentifier("/subscriptions/.../userAssignedIdentities/mysql-identity") }; ArmOperation<MySqlFlexibleServerAadAdministratorResource> operation = await admins .CreateOrUpdateAsync(WaitUntil.Completed, "ActiveDirectory", adminData);
csharp// List servers in resource group await foreach (MySqlFlexibleServerResource server in resourceGroup.GetMySqlFlexibleServers()) { Console.WriteLine($"Server: {server.Data.Name}"); Console.WriteLine($" FQDN: {server.Data.FullyQualifiedDomainName}"); Console.WriteLine($" Version: {server.Data.Version}"); Console.WriteLine($" State: {server.Data.State}"); Console.WriteLine($" SKU: {server.Data.Sku.Name} ({server.Data.Sku.Tier})"); } // List databases in server await foreach (MySqlFlexibleServerDatabaseResource db in server.GetMySqlFlexibleServerDatabases()) { Console.WriteLine($"Database: {db.Data.Name}"); }
csharp// List available backups await foreach (MySqlFlexibleServerBackupResource backup in server.GetMySqlFlexibleServerBackups()) { Console.WriteLine($"Backup: {backup.Data.Name}"); Console.WriteLine($" Type: {backup.Data.BackupType}"); Console.WriteLine($" Completed: {backup.Data.CompletedOn}"); } // Point-in-time restore MySqlFlexibleServerData restoreData = new MySqlFlexibleServerData(AzureLocation.EastUS) { CreateMode = MySqlFlexibleServerCreateMode.PointInTimeRestore, SourceServerResourceId = server.Id, RestorePointInTime = DateTimeOffset.UtcNow.AddHours(-2) }; ArmOperation<MySqlFlexibleServerResource> operation = await servers .CreateOrUpdateAsync(WaitUntil.Completed, "my-mysql-restored", restoreData);
csharpMySqlFlexibleServerResource server = await resourceGroup .GetMySqlFlexibleServerAsync("my-mysql-server"); // Stop server (saves costs when not in use) await server.StopAsync(WaitUntil.Completed); // Start server await server.StartAsync(WaitUntil.Completed); // Restart server await server.RestartAsync(WaitUntil.Completed, new MySqlFlexibleServerRestartParameter { RestartWithFailover = MySqlFlexibleServerEnableStatusEnum.Enabled, MaxFailoverSeconds = 60 });
csharpMySqlFlexibleServerResource server = await resourceGroup .GetMySqlFlexibleServerAsync("my-mysql-server"); MySqlFlexibleServerPatch patch = new MySqlFlexibleServerPatch { Sku = new MySqlFlexibleServerSku("Standard_D4ds_v4", MySqlFlexibleServerSkuTier.GeneralPurpose), Storage = new MySqlFlexibleServerStorage { StorageSizeInGB = 256, Iops = 6000 } }; ArmOperation<MySqlFlexibleServerResource> operation = await server .UpdateAsync(WaitUntil.Completed, patch);
csharpMySqlFlexibleServerResource server = await resourceGroup .GetMySqlFlexibleServerAsync("my-mysql-server"); await server.DeleteAsync(WaitUntil.Completed);
| Type | Purpose | |------|---------| | MySqlFlexibleServerResource | Flexible Server instance | | MySqlFlexibleServerData | Server configuration data | | MySqlFlexibleServerCollection | Collection of servers | | MySqlFlexibleServerDatabaseResource | Database within server | | MySqlFlexibleServerFirewallRuleResource | IP firewall rule | | MySqlFlexibleServerConfigurationResource | Server parameter | | MySqlFlexibleServerBackupResource | Backup metadata | | MySqlFlexibleServerAadAdministratorResource | Entra ID admin | | MySqlFlexibleServerSku | SKU (compute tier + size) | | MySqlFlexibleServerStorage | Storage configuration | | MySqlFlexibleServerHighAvailability | HA configuration | | MySqlFlexibleServerBackupProperties | Backup settings |
| Tier | Use Case | SKU Examples | |------|----------|--------------| | Burstable | Dev/test, light workloads | Standard_B1ms, Standard_B2s | | GeneralPurpose | Production workloads | Standard_D2ds_v4, Standard_D4ds_v4 | | MemoryOptimized | High memory requirements | Standard_E2ds_v4, Standard_E4ds_v4 |
| Mode | Description | |------|-------------| | Disabled | No HA (single server) | | SameZone | HA within same availability zone | | ZoneRedundant | HA across availability zones |
csharpusing Azure; try { ArmOperation<MySqlFlexibleServerResource> operation = await servers .CreateOrUpdateAsync(WaitUntil.Completed, "my-mysql", data); } catch (RequestFailedException ex) when (ex.Status == 409) { Console.WriteLine("Server already exists"); } catch (RequestFailedException ex) when (ex.Status == 400) { Console.WriteLine($"Invalid configuration: {ex.Message}"); } catch (RequestFailedException ex) { Console.WriteLine($"Azure error: {ex.Status} - {ex.Message}"); }
After creating the server, connect using:
csharp// ADO.NET connection string string connectionString = $"Server={server.Data.FullyQualifiedDomainName};" + "Database=myappdb;" + "User Id=mysqladmin;" + "Password=YourSecurePassword123!;" + "SslMode=Required;"; // With Entra ID token (recommended) var credential = new DefaultAzureCredential(); var token = await credential.GetTokenAsync( new TokenRequestContext(new[] { "https://ossrdbms-aad.database.windows.net/.default" })); string connectionString = $"Server={server.Data.FullyQualifiedDomainName};" + "Database=myappdb;" + $"User Id=aad-admin@contoso.com;" + $"Password={token.Token};" + "SslMode=Required;";
| SDK | Purpose | Install | |-----|---------|---------| | Azure.ResourceManager.MySql | MySQL management (this SDK) | dotnet add package Azure.ResourceManager.MySql | | Azure.ResourceManager.PostgreSql | PostgreSQL management | dotnet add package Azure.ResourceManager.PostgreSql | | MySqlConnector | MySQL data access | dotnet add package MySqlConnector |
| Resource | URL | |----------|-----| | NuGet Package | https://www.nuget.org/packages/Azure.ResourceManager.MySql | | API Reference | https://learn.microsoft.com/dotnet/api/azure.resourcemanager.mysql | | Product Documentation | https://learn.microsoft.com/azure/mysql/flexible-server/ | | GitHub Source | https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/mysql/Azure.ResourceManager.MySql |
This skill is applicable to execute the workflow or actions described in the overview.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 13,990 | 10,572 | -24% | 1 | 1 | 0% | 3,158 | 5,957 | +89% | 0 | 0 | — |
case-02 | pass→pass | 13,286 | 8,448 | -36% | 1 | 1 | 0% | 3,043 | 5,518 | +81% | 0 | 0 | — |
case-03 | pass→pass | 9,531 | 6,782 | -29% | 1 | 1 | 0% | 2,118 | 5,136 | +142% | 0 | 0 | — |
case-04 | pass→pass | 8,703 | 7,369 | -15% | 1 | 1 | 0% | 1,861 | 5,068 | +172% | 0 | 0 | — |
case-05 | pass→pass | 10,545 | 7,389 | -30% | 1 | 1 | 0% | 2,184 | 5,160 | +136% | 0 | 0 | — |
case-06 | pass→pass | 11,958 | 7,323 | -39% | 1 | 1 | 0% | 2,548 | 5,190 | +104% | 0 | 0 | — |
case-07 | pass→pass | 9,937 | 6,792 | -32% | 1 | 1 | 0% | 2,041 | 4,988 | +144% | 0 | 0 | — |
case-08 | pass→pass | 7,797 | 7,872 | +1% | 1 | 1 | 0% | 1,618 | 5,213 | +222% | 0 | 0 | — |
case-09 | fail→pass | 10,042 | 8,187 | -18% | 1 | 1 | 0% | 2,055 | 5,340 | +160% | 0 | 0 | — |
case-10 | fail→fail | 10,750 | 7,714 | -28% | 1 | 1 | 0% | 2,218 | 4,806 | +117% | 0 | 0 | — |
case-11 | pass→pass | 12,192 | 8,169 | -33% | 1 | 1 | 0% | 2,416 | 5,221 | +116% | 0 | 0 | — |
case-12 | pass→pass | 13,126 | 10,997 | -16% | 1 | 1 | 0% | 2,881 | 5,886 | +104% | 0 | 0 | — |
case-13 | pass→pass | 3,933 | 1,496 | -62% | 1 | 1 | 0% | 672 | 3,671 | +446% | 0 | 0 | — |
case-14 | fail→pass | 8,048 | 8,054 | +0% | 1 | 1 | 0% | 1,764 | 5,357 | +204% | 0 | 0 | — |
case-15 | pass→pass | 9,836 | 10,178 | +3% | 1 | 1 | 0% | 2,057 | 5,276 | +156% | 0 | 0 | — |
case-16 | pass→pass | 9,147 | 7,281 | -20% | 1 | 1 | 0% | 1,994 | 5,039 | +153% | 0 | 0 | — |
case-17 | pass→pass | 7,303 | 3,134 | -57% | 1 | 1 | 0% | 1,365 | 4,040 | +196% | 0 | 0 | — |
case-18 | fail→pass | 9,977 | 4,756 | -52% | 1 | 1 | 0% | 2,240 | 4,660 | +108% | 0 | 0 | — |
case-19 | pass→pass | 8,266 | 4,522 | -45% | 1 | 1 | 0% | 1,691 | 4,375 | +159% | 0 | 0 | — |
case-20 | pass→pass | 10,095 | 10,893 | +8% | 1 | 1 | 0% | 2,055 | 5,649 | +175% | 0 | 0 | — |
case-21 | pass→pass | 9,294 | 9,331 | +0% | 1 | 1 | 0% | 1,747 | 5,317 | +204% | 0 | 0 | — |
case-22 | pass→fail | 13,930 | 10,426 | -25% | 1 | 1 | 0% | 3,003 | 5,710 | +90% | 0 | 0 | — |
case-23 | pass→pass | 10,217 | 11,590 | +13% | 1 | 1 | 0% | 2,290 | 5,540 | +142% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +13 percentage points is the difference between those two pass rates over the 23 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.6-flash | verified | 7/28/2026 | +14% |
Other measured skills in the registry, with their headline benchmark lift.