1---
2name: azure-database-mysql
3description: Expert knowledge for Azure Database for MySQL development including troubleshooting, best practices, decision making, architecture & design patterns, limits & quotas, security, configuration, integrations & coding patterns, and deployment. Use when deploying MySQL Flexible Server, configuring HA/networking, backups/replicas, migrations, or app integrations, and other Azure Database for MySQL related development tasks. Not for Azure Database for PostgreSQL (use azure-database-postgresql), Azure SQL Database (use azure-sql-database), Azure SQL Managed Instance (use azure-sql-managed-instance), SQL Server on Azure Virtual Machines (use azure-sql-virtual-machines).
4compatibility: Requires network access. Uses mcp_microsoftdocs:microsoft_docs_fetch or fetch_webpage to retrieve documentation.
5metadata:
6 generated_at: "2026-09-06"
7 generator: "docs2skills/1.0.0"
8---
9
10# Azure Database for MySQL Skill
11
12This skill provides expert guidance for Azure Database for MySQL. Covers troubleshooting, best practices, decision making, architecture & design patterns, limits & quotas, security, configuration, integrations & coding patterns, and deployment. It combines local quick-reference content with remote documentation fetching capabilities.
13
14## How to Use This Skill
15
16> **IMPORTANT for Agent**: Use the **Category Index** below to locate relevant sections. For categories with line ranges (e.g., `L35-L120`), use `read_file` with the specified lines. For categories with file links (e.g., `[security.md](security.md)`), use `read_file` on the linked reference file
17
18> **IMPORTANT for Agent**: If `metadata.generated_at` is more than 3 months old, suggest the user pull the latest version from the repository. If `mcp_microsoftdocs` tools are not available, suggest the user install it: [Installation Guide](https://github.com/MicrosoftDocs/mcp/blob/main/README.md)
19
20This skill requires **network access** to fetch documentation content:
21- **Preferred**: Use `mcp_microsoftdocs:microsoft_docs_fetch` with query string `from=learn-agent-skill`. Returns Markdown.
22- **Fallback**: Use `fetch_webpage` with query string `from=learn-agent-skill&accept=text/markdown`. Returns Markdown.
23
24## Category Index
25
26| Category | Lines | Description |
27|----------|-------|-------------|
28| Troubleshooting | L37-L53 | Diagnosing and fixing MySQL Flexible Server issues: connectivity, performance (CPU/memory/queries), capacity, corruption, replication latency, CLI errors, and using logs/self-heal tools. |
29| Best Practices | L54-L72 | Best practices for monitoring, performance tuning, benchmarking, troubleshooting, BCDR, safe operations (restart/delete), read replicas, and migration/after-migration optimization for Azure MySQL. |
30| Decision Making | L73-L89 | Planning lifecycle, HA, and business continuity; choosing tiers, storage, and reservations; and assessing, planning, and executing MySQL migrations and major version upgrades. |
31| Architecture & Design Patterns | L90-L96 | Patterns for connecting AKS to MySQL Flexible Server, designing backup/restore, data-in/out replication, high availability (zone-redundant), and read-replica-based scaling. |
32| Limits & Quotas | L97-L105 | Limits, quotas, and performance caps for MySQL Flexible Server: max connections/cores/IOPS, storage IOPS behavior, quota increase requests, restart/stop limits, and delete/restore time limits. |
33| Security | L106-L130 | Securing Azure MySQL: network access (private link, firewall), TLS and cert rotation, audit logging, encryption (CMK), Entra auth, and secure user management during/after migration. |
34| Configuration | L131-L161 | Configuring Azure Database for MySQL Flexible Server: parameters, HA, networking, logging, monitoring, alerts, maintenance windows, replication, scaling, backups, and read replicas. |
35| Integrations & Coding Patterns | L162-L173 | Connecting apps and tools to MySQL Flexible Server (CLI, JDBC, Power BI), managing connection strings, and migrating MySQL data from RDS, on-prem/VM, or large databases using various tools. |
36| Deployment | L174-L183 | Automating MySQL Flexible Server deployments and changes (Azure Pipelines, GitHub Actions, Automation), handling backups, geo-restore, version upgrades, and scheduled maintenance. |
37
38### Troubleshooting
39| Topic | URL |
40|-------|-----|
41| Use MySQL Flexible Server error logs for troubleshooting | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-error-logs |
42| Resolve database corruption in Azure MySQL flexible server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-fix-corrupt-database |
43| Use self-heal to automatically repair MySQL flexible server issues | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-self-heal |
44| Troubleshoot Azure CLI issues for MySQL flexible server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-troubleshoot-cli-errors |
45| Diagnose and fix MySQL flexible server connection issues | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-troubleshoot-common-connection-issues |
46| Troubleshoot common migration and usage errors in MySQL flexible server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-troubleshoot-common-errors |
47| Troubleshoot connectivity issues and connection handling in MySQL flexible server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-troubleshoot-connectivity-issues |
48| Troubleshoot high CPU utilization in MySQL flexible server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-troubleshoot-high-cpu-utilization |
49| Troubleshoot low memory issues in MySQL flexible server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-troubleshoot-low-memory-issues |
50| Troubleshoot query performance issues in MySQL flexible server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-troubleshoot-query-performance-new |
51| Diagnose and fix MySQL flexible server capacity errors | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/resolve-capacity-errors |
52| Use Query Performance Insight to diagnose Azure MySQL queries | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/tutorial-query-performance-insights |
53| Troubleshoot replication latency on MySQL flexible server read replicas | https://learn.microsoft.com/en-us/azure/mysql/how-to-troubleshoot-replication-latency |
54
55### Best Practices
56| Topic | URL |
57|-------|-----|
58| Implement monitoring best practices for MySQL flexible server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concept-monitor-best-practices |
59| Apply operational best practices for Azure Database for MySQL | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concept-operation-excellence-best-practices |
60| Run performance benchmarks on Azure MySQL flexible server effectively | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concept-perf-benchmark-best-practices |
61| Optimize performance of Azure MySQL flexible server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concept-performance-best-practices |
62| Use Azure Monitor and Advisor for MySQL business continuity | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-business-continuity-advisor-monitor |
63| Configure and manage read replicas in Azure MySQL Flexible Server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-read-replicas |
64| Apply troubleshooting best practices for MySQL flexible server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-troubleshooting-best-practices |
65| Prevent and recover accidental deletion of MySQL Flexible Server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-prevent-recover-accidental-delete |
66| Restart Azure MySQL Flexible Server safely via portal | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-restart-server-portal |
67| Profile and optimize MySQL flexible server queries using EXPLAIN | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-troubleshoot-query-performance |
68| Use sys_schema to diagnose performance issues in MySQL flexible server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-troubleshoot-sys-schema |
69| Execute data migration from on-premises MySQL to Azure | https://learn.microsoft.com/en-us/azure/mysql/migrate/mysql-on-premises-azure-db/08-data-migration |
70| Manage Azure Database for MySQL after migration | https://learn.microsoft.com/en-us/azure/mysql/migrate/mysql-on-premises-azure-db/10-post-migration-management |
71| Optimize Azure Database for MySQL performance after migration | https://learn.microsoft.com/en-us/azure/mysql/migrate/mysql-on-premises-azure-db/11-optimization |
72| Design BCDR for Azure Database for MySQL migrations | https://learn.microsoft.com/en-us/azure/mysql/migrate/mysql-on-premises-azure-db/12-business-continuity-and-disaster-recovery |
73
74### Decision Making
75| Topic | URL |
76|-------|-----|
77| Plan Azure Database for MySQL version lifecycle | https://learn.microsoft.com/en-us/azure/mysql/concepts-version-policy |
78| Choose and purchase MySQL Flexible Server reserved capacity | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concept-reserved-pricing |
79| Plan business continuity for MySQL Flexible Server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-business-continuity |
80| High availability FAQ and choices for MySQL Flexible Server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-high-availability-faq |
81| Select MySQL Flexible Server service tiers and storage | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-service-tiers-storage |
82| Perform minimal-downtime MySQL migration to Azure flexible server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-migrate-online |
83| Plan and execute Azure MySQL major version upgrades | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-upgrade |
84| Plan Azure Database for MySQL major version upgrades | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-upgrade-faq |
85| Plan and execute MySQL migration to Azure Database | https://learn.microsoft.com/en-us/azure/mysql/migrate/mysql-on-premises-azure-db/01-mysql-migration-guide-intro |
86| Assess on-premises MySQL for migration to Azure | https://learn.microsoft.com/en-us/azure/mysql/migrate/mysql-on-premises-azure-db/03-assessment |
87| Plan Azure Database for MySQL migration landing zone | https://learn.microsoft.com/en-us/azure/mysql/migrate/mysql-on-premises-azure-db/04-planning |
88| Choose migration methods to Azure Database for MySQL | https://learn.microsoft.com/en-us/azure/mysql/migrate/mysql-on-premises-azure-db/05-migration-methods |
89| Establish performance baselines for MySQL migration to Azure | https://learn.microsoft.com/en-us/azure/mysql/migrate/mysql-on-premises-azure-db/07-performance-baselines |
90
91### Architecture & Design Patterns
92| Topic | URL |
93|-------|-----|
94| Connect Azure Kubernetes Service to MySQL Flexible Server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-aks |
95| Design data-in replication into MySQL Flexible Server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-data-in-replication |
96| Design data-out replication from MySQL Flexible Server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-data-out-replication |
97
98### Limits & Quotas
99| Topic | URL |
100|-------|-----|
101| Service limitations for Azure MySQL Flexible Server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-limitations |
102| Storage IOPS performance characteristics for MySQL Flexible Server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-storage-iops |
103| Request quota increases for Azure MySQL Flexible Server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-request-quota-increase |
104| Restore deleted Azure MySQL flexible servers within retention limits | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-restore-dropped-server |
105| Restart, stop, and start MySQL flexible server with stop-duration limits | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/scripts/sample-cli-restart-stop-start |
106
107### Security
108| Topic | URL |
109|-------|-----|
110| Use Private Link with Azure MySQL Flexible Server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-networking-private-link |
111| Configure public network access for MySQL Flexible Server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-networking-public |
112| Configure private network access for MySQL Flexible Server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-networking-vnet |
113| Configure Azure MySQL Private Link using Azure CLI | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-networking-private-link-azure-cli |
114| Deny public network access for Azure MySQL via portal | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-networking-private-link-deny-public-access |
115| Secure Azure MySQL with Private Link using portal | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-networking-private-link-portal |
116| Create and connect to MySQL Flexible Server with private access | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/quickstart-create-connect-server-vnet |
117| Configure audit logging for MySQL flexible server via CLI | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/scripts/sample-cli-audit-logs |
118| Configure and analyze audit logs for Azure MySQL | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/tutorial-configure-audit |
119| Secure Azure Database for MySQL during and after migration | https://learn.microsoft.com/en-us/azure/mysql/migrate/mysql-on-premises-azure-db/13-security |
120| Use customer-managed keys for Azure MySQL encryption | https://learn.microsoft.com/en-us/azure/mysql/security/security-customer-managed-key |
121| Configure Microsoft Entra authentication for Azure MySQL | https://learn.microsoft.com/en-us/azure/mysql/security/security-entra-authentication |
122| Create and manage MySQL users securely in Azure | https://learn.microsoft.com/en-us/azure/mysql/security/security-how-to-create-users |
123| Configure data encryption for Azure MySQL using CLI | https://learn.microsoft.com/en-us/azure/mysql/security/security-how-to-data-encryption-cli |
124| Configure data-at-rest encryption in Azure MySQL portal | https://learn.microsoft.com/en-us/azure/mysql/security/security-how-to-data-encryption-portal |
125| Configure Microsoft Entra authentication for Azure MySQL Flexible Server | https://learn.microsoft.com/en-us/azure/mysql/security/security-how-to-entra |
126| Configure Azure MySQL firewall rules with CLI | https://learn.microsoft.com/en-us/azure/mysql/security/security-how-to-manage-firewall-cli |
127| Manage Azure MySQL firewall rules in portal | https://learn.microsoft.com/en-us/azure/mysql/security/security-how-to-manage-firewall-portal |
128| Connect securely to Azure MySQL using TLS | https://learn.microsoft.com/en-us/azure/mysql/security/security-tls-how-to-connect |
129| Manage root certificate rotation for Azure MySQL TLS | https://learn.microsoft.com/en-us/azure/mysql/security/security-tls-root-certificate-rotation |
130| FAQ for Azure MySQL TLS certificate rotation | https://learn.microsoft.com/en-us/azure/mysql/security/security-tls-root-certificate-rotation-faq |
131
132### Configuration
133| Topic | URL |
134|-------|-----|
135| Use built-in stored procedures in MySQL Flexible Server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-built-in-store-procedure |
136| Configure monitoring and alerts for MySQL Flexible Server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-monitor-mysql |
137| Reference monitoring metrics for Azure Database for MySQL | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-monitor-mysql-reference |
138| Configure server parameters for Azure MySQL Flexible Server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-server-parameters |
139| Set up metric-based alerts for Azure MySQL | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-alert-on-metric |
140| Enable or disable zone redundant high availability via portal | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-configure-high-availability |
141| Configure zone redundant high availability for Azure MySQL via CLI | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-configure-high-availability-cli |
142| Configure MySQL flexible server parameters via Azure CLI | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-configure-server-parameters-cli |
143| Configure MySQL Flexible Server parameters in Azure portal | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-configure-server-parameters-portal |
144| Configure data-in replication into Azure MySQL Flexible Server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-data-in-replication |
145| Configure data-out replication from Azure MySQL Flexible Server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-data-out-replication |
146| Configure scheduled maintenance windows for Azure MySQL | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-maintenance-portal |
147| Configure private VNet connectivity for Azure MySQL via CLI | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-manage-virtual-network-cli |
148| Configure private VNet connectivity for Azure MySQL via portal | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-manage-virtual-network-portal |
149| Create and manage Azure MySQL read replicas using CLI | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-read-replicas-cli |
150| Create and manage Azure MySQL read replicas via portal | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-read-replicas-portal |
151| List and download Azure MySQL server logs using CLI | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-server-logs-cli |
152| Enable and download Azure MySQL server logs via portal | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-server-logs-portal |
153| List and modify MySQL flexible server parameters via CLI | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/scripts/sample-cli-change-server-parameters |
154| Create MySQL flexible server with VNet private access via CLI | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/scripts/sample-cli-create-connect-private-access |
155| Configure public access and firewall for MySQL flexible server via CLI | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/scripts/sample-cli-create-connect-public-access |
156| Monitor and scale MySQL flexible server compute, storage, and IOPS | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/scripts/sample-cli-monitor-and-scale |
157| Create and manage MySQL flexible server read replicas via CLI | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/scripts/sample-cli-read-replicas |
158| Restore Azure MySQL flexible server to a point in time via CLI | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/scripts/sample-cli-restore-server |
159| Configure same-zone high availability for MySQL flexible server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/scripts/sample-cli-same-zone-ha |
160| Configure slow query logging for MySQL flexible server via CLI | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/scripts/sample-cli-slow-query-logs |
161| Configure zone-redundant high availability for MySQL flexible server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/scripts/sample-cli-zone-redundant-ha |
162
163### Integrations & Coding Patterns
164| Topic | URL |
165|-------|-----|
166| Use Azure CLI commands to connect to MySQL Flexible Server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/connect-azure-cli |
167| Connect Java applications to MySQL Flexible Server with JDBC | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/connect-java |
168| Connect Azure MySQL Flexible Server to Power BI Desktop | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/connect-with-powerbi-desktop |
169| Migrate Amazon RDS MySQL to Azure flexible server using data-in replication | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-migrate-rds-mysql-data-in-replication |
170| Store MySQL Flexible Server connection strings in Azure Key Vault | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/tutorial-add-mysql-connection-in-key-vault |
171| Migrate large MySQL databases with mydumper/myloader | https://learn.microsoft.com/en-us/azure/mysql/migrate/concepts-migrate-mydumper-myloader |
172| Migrate on-premises or VM MySQL to Azure flexible server using Import CLI | https://learn.microsoft.com/en-us/azure/mysql/migrate/migrate-external-mysql-import-cli |
173| Migrate MySQL data to Azure using MySQL Workbench | https://learn.microsoft.com/en-us/azure/mysql/migrate/mysql-on-premises-azure-db/09-data-migration-with-mysql-workbench |
174
175### Deployment
176| Topic | URL |
177|-------|-----|
178| Configure Azure Pipelines task for Azure MySQL deployments | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/azure-pipelines-deploy-database-task |
179| Plan for scheduled maintenance on MySQL Flexible Server | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-maintenance |
180| Create Azure Automation tasks for MySQL Flexible Server management | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/create-automation-tasks |
181| Move Azure MySQL Flexible Server between regions using geo-restore | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-move-regions |
182| Restore Azure MySQL Flexible Server from backup using CLI | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-restore-server-cli |
183| Restore Azure MySQL Flexible Server from backup via portal | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-restore-server-portal |
184| Use GitHub Actions to deploy changes to Azure MySQL | https://learn.microsoft.com/en-us/azure/mysql/flexible-server/quickstart-mysql-github-actions |