az mysql

注意

此命令群組具有 Azure CLI 和至少一個擴充功能中定義的命令。 安裝每個擴充功能以受益於其擴充功能。 深入了解擴充功能。

管理 適用於 MySQL 的 Azure 資料庫 伺服器。

命令

名稱 Description 類型 狀態
az mysql db

管理伺服器上的 MySQL 資料庫。

核心 GA
az mysql db create

建立 MySQL 資料庫。

核心 GA
az mysql db delete

刪除資料庫。

核心 GA
az mysql db list

列出伺服器的資料庫。

核心 GA
az mysql db show

顯示資料庫的詳細數據。

核心 GA
az mysql down

刪除 MySQL 伺服器及其快取的資訊。

副檔名 GA
az mysql flexible-server

管理 適用於 MySQL 的 Azure 資料庫 彈性伺服器。

核心和擴充功能 GA
az mysql flexible-server ad-admin

管理伺服器 Active Directory 系統管理員。

核心 GA
az mysql flexible-server ad-admin create

建立 Active Directory 系統管理員。

核心 GA
az mysql flexible-server ad-admin delete

刪除 Active Directory 系統管理員。

核心 GA
az mysql flexible-server ad-admin list

列出所有 Active Directory 系統管理員。

核心 GA
az mysql flexible-server ad-admin show

取得 Active Directory 系統管理員。

核心 GA
az mysql flexible-server ad-admin wait

等候 Active Directory 系統管理員滿足特定條件。

核心 GA
az mysql flexible-server advanced-threat-protection-setting

管理伺服器的進階威脅防護設定。

核心 GA
az mysql flexible-server advanced-threat-protection-setting show

取得伺服器的進階威脅防護設定。

核心 GA
az mysql flexible-server advanced-threat-protection-setting update

更新伺服器的進階威脅防護設定。

核心 GA
az mysql flexible-server backup

管理彈性伺服器備份。

核心 GA
az mysql flexible-server backup create

為具有指定備份名稱的指定伺服器建立備份。

核心 GA
az mysql flexible-server backup list

列出指定伺服器的所有備份。

核心 GA
az mysql flexible-server backup show

顯示指定伺服器之特定備份的詳細數據。

核心 GA
az mysql flexible-server connect

連線 彈性伺服器。

副檔名 GA
az mysql flexible-server create

建立 MySQL 彈性伺服器。

核心 GA
az mysql flexible-server db

在彈性伺服器上管理 MySQL 資料庫。

核心 GA
az mysql flexible-server db create

在彈性伺服器上建立 MySQL 資料庫。

核心 GA
az mysql flexible-server db delete

刪除彈性伺服器上的資料庫。

核心 GA
az mysql flexible-server db list

列出彈性伺服器的資料庫。

核心 GA
az mysql flexible-server db show

顯示資料庫的詳細數據。

核心 GA
az mysql flexible-server delete

刪除彈性伺服器。

核心 GA
az mysql flexible-server deploy

啟用並執行 MySQL 伺服器的 GitHub Actions 工作流程。

核心 GA
az mysql flexible-server deploy run

在 github 存放庫中執行現有的工作流程。

核心 GA
az mysql flexible-server deploy setup

建立 MySQL 伺服器的 GitHub Actions 工作流程檔案。

核心 GA
az mysql flexible-server execute

連線 彈性伺服器。

副檔名 GA
az mysql flexible-server export

管理伺服器上的匯出備份。

核心 預覽​​
az mysql flexible-server export create

為具有指定備份名稱的指定伺服器建立匯出備份。

核心 預覽​​
az mysql flexible-server firewall-rule

管理伺服器的防火牆規則。

核心 GA
az mysql flexible-server firewall-rule create

為彈性伺服器建立新的防火牆規則。

核心 GA
az mysql flexible-server firewall-rule delete

刪除防火牆規則。

核心 GA
az mysql flexible-server firewall-rule list

列出彈性伺服器的所有防火牆規則。

核心 GA
az mysql flexible-server firewall-rule show

取得防火牆規則的詳細數據。

核心 GA
az mysql flexible-server firewall-rule update

更新防火牆規則。

核心 GA
az mysql flexible-server geo-restore

從備份異地還原彈性伺服器。

核心 GA
az mysql flexible-server gtid

管理伺服器上的 GTID。

核心 GA
az mysql flexible-server gtid reset

重設伺服器上的 GTID。

核心 GA
az mysql flexible-server identity

管理伺服器使用者指派的身分識別。

核心 GA
az mysql flexible-server identity assign

將使用者已簽署的受控識別新增至伺服器。

核心 GA
az mysql flexible-server identity list

列出來自伺服器的所有使用者指派受控識別。

核心 GA
az mysql flexible-server identity remove

從伺服器移除使用者已簽署的受控識別。

核心 GA
az mysql flexible-server identity show

從伺服器取得使用者指派的受控識別。

核心 GA
az mysql flexible-server import

管理 MySQL 彈性伺服器的匯入工作流程。

核心 GA
az mysql flexible-server import create

為彈性伺服器建立新的匯入工作流程。

核心 GA
az mysql flexible-server list

列出可用的彈性伺服器。

核心 GA
az mysql flexible-server list-skus

列出指定區域中可用的 SKU。

核心 GA
az mysql flexible-server parameter

管理彈性伺服器之伺服器參數值的命令。

核心 GA
az mysql flexible-server parameter list

列出彈性伺服器的參數值。

核心 GA
az mysql flexible-server parameter set

更新彈性伺服器的參數。

核心 GA
az mysql flexible-server parameter set-batch

彈性伺服器的批次更新參數。

核心 GA
az mysql flexible-server parameter show

取得彈性伺服器的參數。」。

核心 GA
az mysql flexible-server replica

管理讀取複本。

核心 GA
az mysql flexible-server replica create

建立伺服器的讀取複本。

核心 GA
az mysql flexible-server replica list

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

核心 GA
az mysql flexible-server replica stop-replication

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

核心 GA
az mysql flexible-server restart

重新啟動彈性伺服器。

核心 GA
az mysql flexible-server restore

從備份還原彈性伺服器。

核心 GA
az mysql flexible-server server-logs

管理伺服器記錄。

核心 GA
az mysql flexible-server server-logs download

下載記錄檔。

核心 GA
az mysql flexible-server server-logs list

列出伺服器的記錄檔。

核心 GA
az mysql flexible-server show

取得彈性伺服器的詳細數據。

核心 GA
az mysql flexible-server show-connection-string

顯示 MySQL 彈性伺服器資料庫的 連接字串。

核心 GA
az mysql flexible-server start

啟動彈性伺服器。

核心 GA
az mysql flexible-server stop

停止彈性伺服器。

核心 GA
az mysql flexible-server update

更新彈性伺服器。

核心 GA
az mysql flexible-server upgrade

升級彈性伺服器的主要版本。

核心 GA
az mysql flexible-server wait

等候彈性伺服器滿足特定條件。

核心 GA
az mysql server

管理 MySQL 伺服器。

核心 GA
az mysql server-logs

管理伺服器記錄。

核心 GA
az mysql server-logs download

下載記錄檔。

核心 GA
az mysql server-logs list

列出伺服器的記錄檔。

核心 GA
az mysql server ad-admin

管理 MySQL 伺服器的 Active Directory 系統管理員。

核心 GA
az mysql server ad-admin create

建立 MySQL 伺服器的 Active Directory 系統管理員。

核心 GA
az mysql server ad-admin delete

刪除 MySQL 伺服器的 Active Directory 管理員 istrator。

核心 GA
az mysql server ad-admin list

列出 MySQL 伺服器的所有 Active Directory 管理員 istrators。

核心 GA
az mysql server ad-admin show

取得 MySQL 伺服器的 Active Directory 管理員 istrator 資訊。

核心 GA
az mysql server ad-admin wait

將 CLI 置於等候狀態,直到符合 MySQL 伺服器 Active Directory 管理員 istrator 的條件為止。

核心 GA
az mysql server configuration

管理伺服器的組態值。

核心 GA
az mysql server configuration list

列出伺服器的設定值。

核心 GA
az mysql server configuration set

更新伺服器的設定。

核心 GA
az mysql server configuration show

取得伺服器的組態。」。

核心 GA
az mysql server create

建立伺服器。

核心 GA
az mysql server delete

刪除伺服器。

核心 GA
az mysql server firewall-rule

管理伺服器的防火牆規則。

核心 GA
az mysql server firewall-rule create

建立伺服器的新防火牆規則。

核心 GA
az mysql server firewall-rule delete

刪除防火牆規則。

核心 GA
az mysql server firewall-rule list

列出伺服器的所有防火牆規則。

核心 GA
az mysql server firewall-rule show

取得防火牆規則的詳細數據。

核心 GA
az mysql server firewall-rule update

更新防火牆規則。

核心 GA
az mysql server georestore

從備份異地還原伺服器。

核心 GA
az mysql server key

管理 MySQL 伺服器金鑰。

核心 GA
az mysql server key create

建立伺服器金鑰。

核心 GA
az mysql server key delete

刪除伺服器金鑰。

核心 GA
az mysql server key list

取得伺服器金鑰的清單。

核心 GA
az mysql server key show

顯示伺服器金鑰。

核心 GA
az mysql server list

列出可用的伺服器。

核心 GA
az mysql server list-skus

列出指定區域中可用的 SKU。

核心 GA
az mysql server private-endpoint-connection

管理 MySQL 伺服器私人端點連線。

核心 GA
az mysql server private-endpoint-connection approve

核准與 MySQL 伺服器相關聯的指定私人端點連線。

核心 GA
az mysql server private-endpoint-connection delete

刪除與 MySQL 伺服器相關聯的指定私人端點連線。

核心 GA
az mysql server private-endpoint-connection reject

拒絕與 MySQL 伺服器相關聯的指定私人端點連線。

核心 GA
az mysql server private-endpoint-connection show

顯示與 MySQL 伺服器相關聯的私人端點連線詳細數據。

核心 GA
az mysql server private-link-resource

管理 MySQL 伺服器私人鏈接資源。

核心 GA
az mysql server private-link-resource list

列出 MySQL 伺服器支援的私人鏈接資源。

核心 GA
az mysql server replica

管理讀取複本。

核心 GA
az mysql server replica create

建立伺服器的讀取複本。

核心 GA
az mysql server replica list

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

核心 GA
az mysql server replica stop

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

核心 GA
az mysql server restart

重新啟動伺服器。

核心 GA
az mysql server restore

從備份還原伺服器。

核心 GA
az mysql server show

取得伺服器的詳細數據。

核心 GA
az mysql server show-connection-string

顯示 MySQL 伺服器資料庫的 連接字串。

核心 GA
az mysql server start

啟動已停止的伺服器。

核心 GA
az mysql server stop

停止執行中的伺服器。

核心 GA
az mysql server update

更新伺服器。

核心 GA
az mysql server upgrade

將 mysql 伺服器升級至更高版本,例如 5.6 至 5.7。

核心 GA
az mysql server vnet-rule

管理伺服器的虛擬網路規則。

核心 GA
az mysql server vnet-rule create

建立虛擬網路規則以允許存取 MySQL 伺服器。

核心 GA
az mysql server vnet-rule delete

刪除具有指定名稱的虛擬網路規則。

核心 GA
az mysql server vnet-rule list

取得伺服器中的虛擬網路規則清單。

核心 GA
az mysql server vnet-rule show

取得虛擬網路規則。

核心 GA
az mysql server vnet-rule update

更新虛擬網路規則。

核心 GA
az mysql server wait

等候伺服器滿足特定條件。

核心 GA
az mysql show-connection-string

顯示 MySQL 伺服器資料庫的 連接字串。

副檔名 GA
az mysql up

設定 適用於 MySQL 的 Azure 資料庫 伺服器和組態。

副檔名 GA

az mysql down

刪除 MySQL 伺服器及其快取的資訊。

az mysql down [--delete-group]
              [--no-wait]
              [--resource-group]
              [--server-name]
              [--yes]

範例

除了資源群組之外,請刪除伺服器和快取的數據。

az mysql down

刪除資源群組和完整快取。

az mysql down --delete-group

選擇性參數

--delete-group

刪除該資源群組。

--no-wait

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

預設值: False
--resource-group -g

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

--server-name -s

伺服器的名稱。

--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 來取得完整偵錯記錄。

az mysql show-connection-string

顯示 MySQL 伺服器資料庫的 連接字串。

az mysql show-connection-string [--admin-password]
                                [--admin-user]
                                [--database-name]
                                [--server-name]

選擇性參數

--admin-password -p

系統管理員的登入密碼。

預設值: {password}
--admin-user -u

系統管理員的登入用戶名稱。

預設值: {login}
--database-name -d

資料庫的名稱。

預設值: {database}
--server-name -s

伺服器的名稱。

預設值: {server}
全域參數
--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 up

設定 適用於 MySQL 的 Azure 資料庫 伺服器和組態。

az mysql up [--admin-password]
            [--admin-user]
            [--backup-retention]
            [--database-name]
            [--generate-password]
            [--geo-redundant-backup {Disabled, Enabled}]
            [--location]
            [--resource-group]
            [--server-name]
            [--sku-name]
            [--ssl-enforcement {Disabled, Enabled}]
            [--storage-size]
            [--tags]
            [--version]

範例

請確定 適用於 MySQL 的 Azure 資料庫 伺服器已啟動並執行並設定為立即使用。

az mysql up

若要覆寫預設名稱,請提供指出所需值/現有資源的參數。

az mysql up -g MyResourceGroup -s MyServer -d MyDatabase -u MyUsername -p MyPassword

選擇性參數

--admin-password -p

系統管理員的登入密碼。 最少8個字元,最多128個字元。 密碼必須包含下列三個類別的字元:英文大寫字母、英文小寫字母、數位和非英數位元。您的密碼不能包含登入名稱的所有或部分。 登入名稱的一部分定義為三個或多個連續英數位元。

--admin-user -u

系統管理員的登入用戶名稱。

--backup-retention

保留備份的天數。

--database-name -d

要初始化的資料庫名稱。

--generate-password

產生密碼。

--geo-redundant-backup

針對伺服器備份啟用異地備援或不啟用。

接受的值: Disabled, Enabled
預設值: Disabled
--location -l

位置。​​ 來自的值: az account list-locations。 您可以使用 az configure --defaults location=<location> 設定預設位置。

--resource-group -g

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

--server-name -s

伺服器的名稱。

--sku-name

sku 的名稱,通常是階層 + 系列 + 核心,例如B_Gen4_1,GP_Gen5_8。

預設值: GP_Gen5_2
--ssl-enforcement

連線到伺服器時,啟用 SSL 強制。

接受的值: Disabled, Enabled
預設值: Enabled
--storage-size

伺服器的最大儲存大小。 單位為 MB。

--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「清除現有的標記」。

--version

伺服器版本。

預設值: 5.7
全域參數
--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 來取得完整偵錯記錄。