# Azure Database for MySQL Flexible Server

> zop.dev provisions a MySQL Flexible Server (sku GP_Standard_D2ds_v4, storage 20 to 16384 GB with scaling on by default) plus an optional read replica, firewall rule, 4 Key Vault secrets, and a db-init job that creates the schemas listed in databases[]. The default engine version is MySQL 5.7.

Source: https://zop.dev/integrations/provision/azure/azure-database-for-mysql-flexible-server
Updated: 2026-08-19

---

Azure Database for MySQL Flexible Server is Microsoft's managed MySQL offering. zop.dev provisions the server with storage scaling, backups, credentials in Key Vault, and initial schemas created by an init job.

## Flexible server, replica, secrets, and db-init

Flexible server plus optional read replica, database, server configuration, firewall rule, four Key Vault secrets, and a db-init job.

## SKU, MySQL 5.7, and the storage scaling range

```text
sku_name default GP_Standard_D2ds_v4; mysql_version default 5.7; storage 20-16384 GB with storage_scaling on by default; iops 360-20000 with io_scaling_enabled; backup_retention_days 7; read_replica; collation and charset; administrator_login default mysqladmin; databases[] and multi_ds; key_vault_id; 49 Azure SQL SKUs cataloged (Burstable B, GP D-series, Memory Optimized E-series).
```

## Region westus and replica create_mode

Default region westus. The provisioner API supports replicas via create_mode and source_server_id.

## Four secrets and an init job

The server never arrives bare. Provisioning writes 4 Key Vault secrets at
different privilege levels, so applications and humans get scoped logins instead of sharing
`mysqladmin`. Provisioning also runs a db-init job that creates every schema in `databases[]` before any
application connects. Add the database, server configuration, and firewall rule resources, and
`multi_ds` for the multi-schema case, and the deliverable is a connectable environment rather
than an empty engine.

## The 5.7 default deserves a look

`mysql_version` defaults to 5.7, which is past community end-of-life. Azure keeps it running,
but the ecosystem has moved. The catch is that 5.7 to 8.0 is a major-version upgrade with real
compatibility checks, not a settings change, and the longer a fleet stands on 5.7 the larger
that migration grows. New provisions that can start at 8.0 should; the default is a
compatibility choice, not a recommendation.

## Storage ratchets upward

Storage runs 20 to 16384 GB with `storage_scaling` on by default, and `io_scaling_enabled`
covering IOPS from 360 to 20000. Auto-grow prevents the full-disk outage (the worst failure a
managed database offers), but flexible-server storage never shrinks. Every growth event is a
new permanent floor for the storage bill, so a runaway table that balloons the disk leaves a
cost residue after the data is cleaned up.

## Fixed at creation

`administrator_login` (default mysqladmin) is permanent once the server exists, and the default
region is westus. The read replica is its own server with its own bill; the provisioner
supports replica creation via create_mode and source_server_id. `backup_retention_days`
defaults to 7, which is the recovery window you actually have until someone raises it.
