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.
The article describes how you can enable or disable zone redundant high availability configuration at the time of server creation in your Azure Database for MySQL flexible server instance. You can disable zone redundant high availability after server creation too. Enabling zone redundant high availability after server creation isn't 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 doesn't change your other settings including VNET configuration, firewall settings, and backup retention. Disabling of high availability doesn't impact your application connectivity and operations.
Prerequisites
- An Azure account with an active subscription.
If you don't have an Azure subscription, create an Azure trial account before you begin.
Install or upgrade Azure CLI to the latest version. See Install Azure CLI.
Sign in to your Azure account using az login. Note the id property, which refers to the Subscription ID for your Azure account.
az login
If you have multiple subscriptions, choose the appropriate subscription in which you want to create the Azure Database for MySQL flexible server instance using the
az account set
command.az account set --subscription <subscription id>
Enable high availability during server creation
You can only create an Azure Database for MySQL flexible server instance 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.
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 chinanorth3
Disable high availability
You can disable high availability by using the az mysql flexible-server update command. Disabling high availability is only supported if the server was created with high availability.
az mysql flexible-server update [--high-availability {Disabled, SameZone, ZoneRedundant}]
[--resource-group]
[--name]
Note
If you want to move from ZoneRedundant to SameZone you would have to first disable high availability and then enable same zone.
Example:
az mysql flexible-server update --resource-group myresourcegroup --name myservername --high-availability Disabled