azure-resource-manager-mysql-dotnet
Azure MySQL Flexible Server SDK for .NET. Database management for MySQL Flexible Server deployments. Use for creating servers, databases, firewall rules, configurations, backups, and high availability.
Install / Use
npx skills add microsoft/skills --skill azure-resource-manager-mysql-dotnetInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
OperationsSupported Platforms
Our assessment of azure-resource-manager-mysql-dotnet
azure-resource-manager-mysql-dotnet scores 95/100 on our quality scale, 94th of 503 Operations skills we index (top 19%).
Its SKILL.md is 14 KB long, well organised into 24 sections with 16 code examples: a thorough specification that gives an agent plenty to work with.
With 3,051 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 5 days ago, so azure-resource-manager-mysql-dotnet is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
azure-resource-manager-mysql-dotnet compared with similar skills
All 4 of these similar skills score higher than azure-resource-manager-mysql-dotnet; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| azure-resource-manager-mysql-dotnet (this skill)by microsoft | 95 | 3.1k | 5d ago | SKILL.md |
| claude-memby thedotmack | 100 | 94.9k | today | CLAUDE.md |
| algorithmic-artby anthropics | 100 | 177.9k | 6d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 6d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 130.2k | 7d ago | SKILL.md |
Frequently asked questions
- How do I install azure-resource-manager-mysql-dotnet?
- Run
npx skills add microsoft/skills --skill azure-resource-manager-mysql-dotnet. The install tabs above show the steps for each supported agent. - Which AI agents does azure-resource-manager-mysql-dotnet work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is azure-resource-manager-mysql-dotnet safe to use?
- It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is azure-resource-manager-mysql-dotnet still maintained?
- The repository was last updated 5 days ago, so azure-resource-manager-mysql-dotnet is actively maintained.
Skill content
View source on GitHubname: azure-resource-manager-mysql-dotnet description: | Azure MySQL Flexible Server SDK for .NET. Database management for MySQL Flexible Server deployments. Use for creating servers, databases, firewall rules, configurations, backups, and high availability. Triggers: "MySQL", "MySqlFlexibleServer", "MySQL Flexible Server", "Azure Database for MySQL", "MySQL database management", "MySQL firewall", "MySQL backup". license: MIT metadata: author: Microsoft version: "1.0.0" package: Azure.ResourceManager.MySql
Azure.ResourceManager.MySql (.NET)
Azure Resource Manager SDK for managing MySQL Flexible Server deployments.
Installation
dotnet 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.
Environment Variables
AZURE_SUBSCRIPTION_ID=<your-subscription-id> # Required: Azure subscription ID
AZURE_RESOURCE_GROUP=<your-resource-group> # Required: resource group name
AZURE_MYSQL_SERVER_NAME=<your-mysql-server> # Required: MySQL Flexible Server name
AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production
Authentication
using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.MySql;
using Azure.ResourceManager.MySql.FlexibleServers;
// Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=<specific_credential>
var credential = new DefaultAzureCredential(
DefaultAzureCredential.DefaultEnvironmentVariableName
);
// Or use a specific credential directly in production:
// See https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme?view=azure-dotnet#credential-classes
// var credential = new ManagedIdentityCredential();
ArmClient client = new ArmClient(credential);
Resource Hierarchy
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 admin
Core Workflows
1. Create MySQL Flexible Server
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 = "YourSecurePassword123!",
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}");
2. Create Database
MySqlFlexibleServerResource 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}");
3. Configure Firewall Rules
MySqlFlexibleServerFirewallRuleCollection 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);
4. Update Server Configuration
MySqlFlexibleServerConfigurationCollection 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" };
5. Configure Entra ID Administrator
MySqlFlexibleServerAadAdministratorCollection 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);
6. List and Manage Servers
// 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}");
}
7. Backup and Restore
// 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);
8. Stop and Start Server
MySqlFlexibleServerResource 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
});
9. Update Server (Scale)
MySqlFlexibleServerResource 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);
10. Delete Server
MySqlFlexibleServerResource server = await resourceGroup
.GetMySqlFlexibleServerAsync("my-mysql-server");
await server.DeleteAsync(WaitUntil.Completed);
Key Types Reference
| 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 |
SKU Tiers
| 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 |
High Availability Modes
| Mode | Description |
|------|-------------|
| Disabled | No HA (single server) |
| SameZone | HA within same availability zone |
| ZoneRedundant | HA across availability zones |
Best Practices
- Use Flexible Server — Single Server is deprecated
- Enable zone-redundant HA — For production workloads
- Use DefaultAzureCredential — Prefer over connection strings
- Configure Entra ID authentication — More secure than SQL auth
- Enable auto-grow storage — Prevents out-of-space issues
- Set appropriate backup retention — 7-35 days based on compliance
- Use private endpoints — For secure network access
- Tune server parameters — Based on workload characteristics
- Monitor with Azure Monitor — Enable metrics and logs
- Stop dev/test servers — Save costs when not in use
Error Handling
us
Truncated for display — read the full file on GitHub.
Related Skills
claude-mem
94.9kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
130.2kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
