az mysql flexible-server replica

Manage read replicas.

Commands

az mysql flexible-server replica create

Create a read replica for a server.

az mysql flexible-server replica list

List all read replicas for a given server.

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 create

Create a read replica for a server.

az mysql flexible-server replica create --name
                                        --resource-group
                                        --source-server
                                        [--location]
                                        [--no-wait]
                                        [--sku-name]
                                        [--subscription]
                                        [--tier]

Examples

Create a read replica 'testReplicaServer' for 'testServer'.

az mysql flexible-server replica create -n testReplicaServer -g testGroup --source-server testServer

Required Parameters

--name -n

Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--source-server

The name or resource ID of the source server to restore from.

Optional Parameters

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--no-wait

Do not wait for the long-running operation to finish.

--sku-name

The name of the compute SKU. Follows the convention Standard_{VM name}. Examples: Standard_B1ms, Standard_D4s_v3.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--tier

Compute tier of the server. Accepted values: Burstable, GeneralPurpose, Memory Optimized.

az mysql flexible-server replica list

List all read replicas for a given server.

az mysql flexible-server replica list --name
                                      --resource-group
                                      [--query-examples]
                                      [--subscription]

Examples

List all read replicas for master server 'testServer'.

az mysql flexible-server replica list -g testGroup -s primaryservername

Required Parameters

--name -s

Name of the server.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

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 -s testReplicaServer

Optional Parameters

--ids

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 -s

Name of the server.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.