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 --replica-name
                                        --resource-group
                                        --source-server
                                        [--no-wait]
                                        [--subscription]
                                        [--zone]

Examples

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

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

Required Parameters

--replica-name

The name of the server to restore to.

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

--no-wait

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

--subscription

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

--zone -z

Availability zone into which to provision the resource.

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 -n primaryservername

Required Parameters

--name -n

Name of the source 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 -n 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 -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>.

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