Manage zone redundant high availability in Azure Database for MySQL - Flexible Server with Azure CLI

APPLIES TO: Azure Database for MySQL - Flexible Server

The article describes how you can enable or disable zone redundant high availability configuration at the time of server creation in your flexible server. You can disable zone redundant high availability after server creation too. Enabling zone redundant high availability after server creation is not supported.

High availability feature provisions physically separate primary and standby replica in different zones. For more information, see high availability concepts documentation. Enabling or disabling high availability does not change your other settings including VNET configuration, firewall settings, and backup retention. Disabling of high availability does not impact your application connectivity and operations.


Zone redundant high availability is available in limited set of regions. Please review the supported regions here.


  • An Azure account with an active subscription.

    If you don't have an Azure subscription, create an Azure free account before you begin. With an Azure free account, you can now try Azure Database for MySQL - Flexible Server for free for 12 months. For more information, see Try Flexible Server for free.

  • Install or upgrade Azure CLI to the latest version. See Install Azure CLI.

  • Login to Azure account using az login command. Note the id property, which refers to Subscription ID for your Azure account.

    az login
  • If you have multiple subscriptions, choose the appropriate subscription in which you want to create the server using the az account set command.

    az account set --subscription <subscription id>

Enable high availability during server creation

You can only create server using General purpose or Business Critical pricing tiers with high availability. You can enable Zone redundant high availability for a server only during create time.


 az mysql flexible-server create [--high-availability {Disabled, SameZone, ZoneRedundant}]


 az mysql flexible-server create --name myservername --sku-name Standard_D2ds_v4 --tier GeneralPurpose --resource-group myresourcegroup --high-availability ZoneRedundant --location eastus

Disable high availability

You can disable high availability by using the az mysql flexible-server update command. Note that disabling high availability is only supported if the server was created with high availability.

az mysql flexible-server update [--high-availability {Disabled, SameZone, ZoneRedundant}]


If you want to move from ZoneRedundant to SameZone you would have to first disable high availability and then enable same zone.


 az mysql flexible-server update --resource-group myresourcegroup --name myservername --high-availability Disabled

Next steps