az mysql server replica

管理讀取複本。

命令

名稱 Description 類型 狀態
az mysql server replica create

建立伺服器的讀取複本。

核心 GA
az mysql server replica list

列出指定伺服器的所有讀取複本。

核心 GA
az mysql server replica stop

停止複寫至讀取複本,並將其設為讀取/寫入伺服器。

核心 GA

az mysql server replica create

建立伺服器的讀取複本。

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

範例

為 'testsvr' 建立讀取複本 'testreplsvr'。

az mysql server replica create -n testreplsvr -g testgroup -s testsvr

為 'testsvr2' 建立讀取複本 'testreplsvr',其中 'testreplsvr' 位於不同的資源群組中。

az mysql server replica create -n testreplsvr -g testgroup \
    -s "/subscriptions/${SubID}/resourceGroups/${ResourceGroup}/providers/Microsoft.DBforMySQL/servers/testsvr2"

必要參數

--name -n

伺服器的名稱。 名稱只能包含小寫字母、數字及連字號 (-) 字元。 最少 3 個字元,最多 63 個字元。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--source-server -s

建立複本之主伺服器的名稱或資源識別碼。

選擇性參數

--location -l

位置。​​ 來自的值: az account list-locations 。 如果未提供,則建立複本會位於與主伺服器相同的位置。

--no-wait

請勿等候長時間執行的作業完成。

預設值: False
--sku-name

SKU 的名稱。 遵循慣例 {定價層} {計算產生} {vCores} 的速記。 範例:B_Gen5_1、GP_Gen5_4、MO_Gen5_16。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az mysql server replica list

列出指定伺服器的所有讀取複本。

az mysql server replica list [--ids]
                             [--resource-group]
                             [--server-name]
                             [--subscription]

範例

列出主伺服器 'testsvr' 的所有讀取複本。

az mysql server replica list -g testgroup -s testsvr

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--server-name -s

主伺服器的名稱。

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az mysql server replica stop

停止複寫至讀取複本,並將其設為讀取/寫入伺服器。

az mysql server replica stop [--ids]
                             [--name]
                             [--resource-group]
                             [--subscription]
                             [--yes]

範例

停止複寫至 'testreplsvr',並將其設為讀取/寫入伺服器。

az mysql server replica stop -g testgroup -n testreplsvr

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源識別碼」引數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」引數。

--name -n

伺服器的名稱。 名稱只能包含小寫字母、數字及連字號 (-) 字元。 最少 3 個字元,最多 63 個字元。

--resource-group -g

資源組名。 您可以使用 來設定預設群組 az configure --defaults group=<name>

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--yes -y

不提示確認。

預設值: False
全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

接受的值: json, jsonc, none, table, tsv, yaml, yamlc
預設值: json
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或識別碼。 您可以使用 來設定預設訂用 az account set -s NAME_OR_ID 帳戶。

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。