Skip to content

Latest commit

 

History

History
59 lines (42 loc) · 2.58 KB

sample-cli-same-zone-ha.md

File metadata and controls

59 lines (42 loc) · 2.58 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic ms.custom ms.devlang
CLI script - Configure same-zone high availability
This Azure CLI sample script shows how to configure same-zone high availability in an Azure Database for MySQL - Flexible Server instance.
shreyaaithal
shaithal
maghan
06/18/2024
mysql
flexible-server
sample
mvc
devx-track-azurecli
azurecli

Configure same-zone high availability in Azure Database for MySQL - Flexible Server using Azure CLI

[!INCLUDEapplies-to-mysql-flexible-server]

This sample CLI script configures and manages Same-Zone high availability in an Azure Database for MySQL - Flexible Server. Currently, Same-Zone high availability is supported only for the General purpose and Business Critical pricing tiers.

[!INCLUDE quickstarts-free-trial-note]

[!INCLUDE azure-cli-prepare-your-environment.md]

Sample script

[!INCLUDE cli-launch-cloud-shell-sign-in.md]

Run the script

:::code language="azurecli" source="~/azure_cli_scripts/mysql/flexible-server/high-availability/same-zone-ha.sh" id="FullScript":::

Clean up resources

[!INCLUDE cli-clean-up-resources.md]

az group delete --name $resourceGroup

Sample reference

This script uses the following commands. Each command in the table links to command specific documentation.

Command Notes
az group create Creates a resource group in which all resources are stored
az mysql flexible-server create Creates a Flexible Server that hosts the databases.
az mysql flexible-server update Updates a Flexible Server.
az mysql flexible-server delete Deletes a Flexible Server.
az group delete Deletes a resource group including all nested resources.

Next steps