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 |
|
azurecli |
[!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]
[!INCLUDE cli-launch-cloud-shell-sign-in.md]
:::code language="azurecli" source="~/azure_cli_scripts/mysql/flexible-server/high-availability/same-zone-ha.sh" id="FullScript":::
[!INCLUDE cli-clean-up-resources.md]
az group delete --name $resourceGroup
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. |
- Try additional scripts: Azure CLI samples for Azure Database for MySQL - Flexible Server
- For more information on the Azure CLI, see Azure CLI documentation.