Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article describes how to enable or disable zone redundant high-availability configuration when you create a server in your Azure Database for MySQL flexible server instance. You can also disable zone redundant high-availability after server creation. Enabling zone redundant high-availability after server creation isn't supported.
The high-availability feature provisions physically separate primary and standby replicas in different zones. For more information, see high-availability concepts documentation. Enabling or disabling high-availability doesn't change your other settings, including virtual network configuration, firewall settings, and backup retention. Disabling high-availability doesn't impact your application connectivity and operations.
Important
Zone redundant high-availability is available in a limited set of regions.
Prerequisites
An Azure account with an active subscription.
If you don't have an Azure subscription, create an Azure free account before you begin. Currently, with an Azure free account, you can try Azure Database for MySQL - Flexible Server free for 12 months. For more information, see Use an Azure free account to try Azure Database for MySQL - Flexible Server for free.
Install or upgrade Azure CLI to the latest version. See Install Azure CLI.
Sign in to your Azure account with az login. Note the id property, which refers to the Subscription ID for your Azure account.
az loginIf you have multiple subscriptions, choose the appropriate subscription in which you want to create the Azure Database for MySQL flexible server instance by using the
az account setcommand.az account set --subscription <subscription id>
Enable high-availability during server creation
You can only create an Azure Database for MySQL flexible server instance with high-availability by using the General Purpose or Business Critical pricing tiers. You can enable zone redundant high-availability for a server only during creation.
Usage:
az mysql flexible-server create [--high-availability {Disabled, SameZone, ZoneRedundant}]
[--sku-name]
[--tier]
[--resource-group]
[--location]
[--name]
Example:
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. You can disable high-availability only if the server was created with high-availability.
az mysql flexible-server update [--high-availability {Disabled, SameZone, ZoneRedundant}]
[--resource-group]
[--name]
Note
To move from ZoneRedundant to SameZone, first disable high-availability, then enable same zone.
Example:
az mysql flexible-server update \
--resource-group myresourcegroup \
--name myservername \
--high-availability Disabled