az mysql flexible-server replica
Manage read replicas.
Commands
Name | Description | Type | Status |
---|---|---|---|
az mysql flexible-server replica create |
Create a read replica for a server. |
Core | GA |
az mysql flexible-server replica list |
List all read replicas for a given server. |
Core | GA |
az mysql flexible-server replica stop-replication |
Stop replication to a read replica and make it a read/write server. |
Core | GA |
az mysql flexible-server replica create
Create a read replica for a server.
az mysql flexible-server replica create --replica-name
--resource-group
--source-server
[--backup-retention]
[--database-port]
[--geo-redundant-backup {Disabled, Enabled}]
[--iops]
[--location]
[--no-wait]
[--private-dns-zone]
[--public-access {Disabled, Enabled}]
[--sku-name]
[--storage-size]
[--subnet]
[--tags]
[--tier]
[--vnet]
[--zone]
Examples
Create a read replica 'testReplicaServer' for 'testserver' in the specified zone if available.
az mysql flexible-server replica create --replica-name testReplicaServer -g testGroup --source-server testserver --zone 3
Required Parameters
The name of the server to restore to.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The name or resource ID of the source server to restore from.
Optional Parameters
The number of days a backup is retained. Range of 1 to 35 days. Default is 7 days.
The port of the database. Default value is 3306.
Whether or not geo redundant backup is enabled.
Number of IOPS to be allocated for this server. You will get certain amount of free IOPS based on compute and storage provisioned. The default value for IOPS is free IOPS. To learn more about IOPS based on compute and storage, refer to IOPS in Azure Database for MySQL Flexible Server.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Do not wait for the long-running operation to finish.
This parameter only applies if you are creating cross region replica server with private access. For in-region read replica with private access, source server settings are carried over and this parameter is ignored. The name or id of new or existing private dns zone. You can use the private dns zone from same resource group, different resource group, or different subscription. If you want to use a zone from different resource group or subscription, please provide resource Id. CLI creates a new private dns zone within the same resource group as virtual network if not provided by users.
Determines the public access.
The name of the compute SKU. Follows the convention Standard_{VM name}. Examples: Standard_B1ms.
The storage capacity of the server. Minimum is 32 GiB and max is 16 TiB.
Name or resource ID of a new or existing subnet. This parameter only applies if you are creating cross region replica server with private access. For in-region read replica with private access, source server settings are carried over and this parameter is ignored. If you want to use a subnet from different resource group or subscription, please provide resource ID instead of name. Please note that the subnet will be delegated to flexibleServers. After delegation, this subnet cannot be used for any other type of Azure resources.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Compute tier of the server. Accepted values: Burstable, GeneralPurpose, MemoryOptimized.
Name or ID of a new or existing virtual network. This parameter only applies if you are creating cross region replica server with private access. For in-region read replica with private access, source server settings are carried over and this parameter is ignored. If you want to use a vnet from different resource group or subscription, please provide a resource ID. The name must be between 2 to 64 characters. The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens.
Availability zone into which to provision the resource.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az mysql flexible-server replica list
List all read replicas for a given server.
az mysql flexible-server replica list --name
--resource-group
Examples
List all read replicas for master server 'testserver'.
az mysql flexible-server replica list -g testGroup -n testserver
Required Parameters
Name of the source server.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az mysql flexible-server replica stop-replication
Stop replication to a read replica and make it a read/write server.
az mysql flexible-server replica stop-replication [--ids]
[--name]
[--resource-group]
[--subscription]
[--yes]
Examples
Stop replication to 'testReplicaServer' and make it a read/write server.
az mysql flexible-server replica stop-replication -g testGroup -n testReplicaServer
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Azure CLI