Last updated: May 2026
Azure DatabasesBeginnerAZ-104⏱ 11 min read

Azure Database for MySQL

Azure Database for MySQL is a fully managed MySQL database service — handling patching, backups, HA, and scaling automatically. It's the go-to choice for LAMP stack applications, WordPress sites, and any workload already running on MySQL. It delivers community MySQL compatibility in a managed, enterprise-grade service.

What you'll learn Flexible Server architecture · Service tiers (Burstable, General Purpose, Business Critical) · High availability zones · Automated backups and PITR · Read replicas · Security features · Connecting to MySQL · Creating via CLI · Migration from on-premises

Flexible Server

Azure Database for MySQL — Flexible Server is the current recommended deployment option (the older Single Server is retired). Flexible Server provides:

  • Full control over maintenance windows
  • Zone-redundant HA or same-zone HA
  • Burstable compute for cost savings
  • Stop/start capability — pause billing when not in use
  • Better customisation of MySQL server parameters
  • VNet integration for private access

Service Tiers

TiervCoresBest ForCost
Burstable1–20Dev/test, low-traffic apps, WordPressLowest
General Purpose2–64Most production workloadsMedium
Business Critical2–96High IOPS, memory-intensive, mission criticalHighest
💡
Burstable for WordPress The Burstable tier uses B-series compute — perfect for WordPress and low-traffic apps that don't need full CPU continuously. It earns CPU credits when idle and bursts when needed — much cheaper than General Purpose for typical CMS workloads.

High Availability

Flexible Server offers two HA options:

HA ModeArchitectureSLAFailover Time
Zone-Redundant HAPrimary + standby in different AZs99.99%60–120 seconds
Same-Zone HAPrimary + standby in same AZ99.9%Under 60 seconds
No HASingle server99.9%N/A

Backups and PITR

  • Automated backups — Daily full + transaction log backups
  • Retention — 1 to 35 days (default 7 days)
  • Point-in-time restore — Restore to any second within the retention window
  • Geo-redundant backups — Optional — replicate backup to paired region for geo-restore
  • Restore — Creates a new server — does not restore in-place

Read Replicas

Create up to 5 read replicas in the same or different regions. Replicas receive async replication from the primary. Use replicas to:

  • Scale out read-heavy workloads (reporting, analytics)
  • Serve read traffic from geographically distant regions
  • Promote a replica to standalone server if primary fails (manual process)

Security

  • Encryption at rest — AES-256, always enabled
  • Encryption in transit — SSL/TLS enforced by default
  • Firewall rules — Control which IPs can connect
  • VNet integration — Private access without public IP
  • Azure AD authentication — Use Azure AD identities instead of MySQL passwords
  • Microsoft Defender for MySQL — Threat detection, anomaly detection

Creating via CLI

Azure CLICreate MySQL Flexible Server
# Create MySQL Flexible Server
az mysql flexible-server create \
  --name mymysqlserver-2026 \
  --resource-group myRG \
  --location centralindia \
  --admin-user mysqladmin \
  --admin-password "SecureP@ssword123!" \
  --sku-name Standard_B2ms \
  --tier Burstable \
  --version 8.0 \
  --storage-size 32 \
  --high-availability ZoneRedundant

Migration from On-Premises

Two common approaches:

  • Azure Database Migration Service — Online migration with minimal downtime. Continuous replication until cutover.
  • mysqldump + restore — Dump the database, import to Azure MySQL. Simple but requires downtime.
💡
AZ-104 Exam Tip Know Flexible Server is the current recommended deployment option. Know the three tiers (Burstable, General Purpose, Business Critical). Know that PITR retention is 1–35 days. Know that restoring creates a new server — it does not restore in-place.
📝 Practice Questions
Click an option to check your answer.
Q1. What happens when you perform a Point-in-Time Restore on Azure Database for MySQL?
A — The existing server is restored in-place to the specified point
B — A new server is created with data from the specified point in time
C — A backup file is created in Azure Blob Storage
D — Only the last transaction is rolled back
Q2. Which Azure Database for MySQL service tier is best for a low-traffic WordPress site?
A — Burstable
B — General Purpose
C — Business Critical
D — Standard
Q3. What is the maximum number of read replicas you can create for Azure Database for MySQL?
A — 1
B — 5
C — 10
D — Unlimited
Q4. Which HA configuration provides the highest SLA for Azure Database for MySQL?
A — Zone-Redundant HA (primary and standby in different AZs) — 99.99%
B — Same-Zone HA — 99.99%
C — No HA — 99.95%
D — Business Critical tier only — 99.999%
Q5. Is encryption at rest enabled by default for Azure Database for MySQL?
A — Yes — AES-256 encryption at rest is always enabled and cannot be disabled
B — No — it must be manually enabled
C — Only for Business Critical tier
D — Yes — but only with an additional cost
Comments
Disclaimer: RedKite Cloud is an independent educational resource and is not affiliated with Microsoft Corporation.