az mysql server
管理 MySQL 服务器。
命令
az mysql server create
创建服务器。
az mysql server create [--admin-password]
[--admin-user]
[--assign-identity]
[--auto-grow {Disabled, Enabled}]
[--backup-retention]
[--geo-redundant-backup {Disabled, Enabled}]
[--infrastructure-encryption {Disabled, Enabled}]
[--location]
[--minimal-tls-version {TLS1_0, TLS1_1, TLS1_2, TLSEnforcementDisabled}]
[--name]
[--public --public-network-access]
[--resource-group]
[--sku-name]
[--ssl-enforcement {Disabled, Enabled}]
[--storage-size]
[--tags]
[--version]
示例
使用 sku GP_Gen5_2(常规用途、第 5 代硬件、2 个 vCore)在北欧创建 MySQL 服务器。
az mysql server create -l northeurope -g testgroup -n testsvr -u username -p password \
--sku-name GP_Gen5_2
创建设置了所有参数的 MySQL 服务器。
az mysql server create -l northeurope -g testgroup -n testsvr -u username -p password \
--sku-name B_Gen5_1 --ssl-enforcement Enabled --minimal-tls-version TLS1_0 --public-network-access Disabled \
--backup-retention 10 --geo-redundant-backup Enabled --storage-size 51200 \
--tags "key=value" --version 5.7
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
管理员的密码。 最少 8 个字符,最多 128 个字符。 密码必须包含以下类别中的三个类别的字符:英文大写字母、英文小写字母、数字和非字母数字字符。
属性 | 值 |
---|---|
Parameter group: | Authentication Arguments |
服务器的管理员用户名。 设置后,无法更改它。
属性 | 值 |
---|---|
Parameter group: | Authentication Arguments |
默认值: | venaltomatoe6 |
为此服务器生成并分配一个Microsoft Entra Identity,以用于 Azure KeyVault 等密钥管理服务。
属性 | 值 |
---|---|
默认值: | False |
启用或禁用存储的自动增长。 默认值为“已启用”。
属性 | 值 |
---|---|
默认值: | Enabled |
接受的值: | Disabled, Enabled |
备份保留的天数。 范围为 7 到 35 天。 默认值为 7 天。
启用或禁用异地冗余备份。 默认值为 Disabled。 基本定价层不支持。
属性 | 值 |
---|---|
接受的值: | Disabled, Enabled |
使用新的加密算法为数据添加可选的第二层加密。 默认值为 Disabled。
属性 | 值 |
---|---|
接受的值: | Disabled, Enabled |
Location.
az account list-locations
中的值。 可以使用 az configure --defaults location=<location>
配置默认位置。
启用 SSL 时,为连接到服务器的最小 TLS 版本设置。 默认值为 TLSEnforcementDisabled。
属性 | 值 |
---|---|
接受的值: | TLS1_0, TLS1_1, TLS1_2, TLSEnforcementDisabled |
服务器的名称。 名称只能包含小写字母、数字和连字符 (-)。 最少 3 个字符,最多 63 个字符。
启用或禁用对服务器的公用网络访问。 禁用后,只有通过专用链接建立的连接才能访问此服务器。 允许的值为:Enabled
、、、Disabled
all
0.0.0.0
、。 <SingleIP>
<StartIP-DestinationIP>
默认值为 Enabled
。
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
SKU 的名称。 Follows the convention {pricing tier}{compute generation}{vCores} in shorthand. 示例:B_Gen5_1、GP_Gen5_4、MO_Gen5_16。
属性 | 值 |
---|---|
默认值: | GP_Gen5_2 |
启用或禁用与服务器的连接的 ssl 强制实施。 默认值为“已启用”。
属性 | 值 |
---|---|
接受的值: | Disabled, Enabled |
服务器的存储容量(以 MB 为单位)。 最小值为 5120,以 1024 为增量递增。 默认值为 5120。
属性 | 值 |
---|---|
默认值: | 5120 |
空格分隔标记:key[=value] [key[=value] ...]。使用“”清除现有标记。
服务器主版本。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az mysql server delete
删除服务器。
az mysql server delete [--ids]
[--name]
[--resource-group]
[--subscription]
[--yes]
示例
删除服务器。
az mysql server delete -g testgroup -n testsvr
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
服务器的名称。 名称只能包含小写字母、数字和连字符 (-)。 最少 3 个字符,最多 63 个字符。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
不要提示确认。
属性 | 值 |
---|---|
默认值: | False |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az mysql server georestore
从备份异地还原服务器。
az mysql server georestore --location
--source-server
[--backup-retention]
[--geo-redundant-backup]
[--ids]
[--name]
[--no-wait]
[--resource-group]
[--sku-name]
[--subscription]
示例
将“testsvr”异地还原到位于美国西部 2 的新服务器“testsvrnew”。
az mysql server georestore -g testgroup -n testsvrnew --source-server testsvr -l westus2
将“testsvr”异地还原到位于美国西部 2 的新服务器“testsvrnew”,其 sku GP_Gen5_2。
az mysql server georestore -g testgroup -n testsvrnew --source-server testsvr -l westus2 --sku-name GP_Gen5_2
将“testsvr2”异地还原到新的服务器“testsvrnew”中,其中“testsvrnew”位于不同于“testsvr2”的资源组中。
az mysql server georestore -g testgroup -n testsvrnew \
-s "/subscriptions/${SubID}/resourceGroups/${ResourceGroup}/providers/Microsoft.DBforMySQL/servers/testsvr2" \
-l westus2
必需参数
Location.
az account list-locations
中的值。 可以使用 az configure --defaults location=<location>
配置默认位置。
要从中还原的源服务器的名称或 ID。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
备份保留的天数。 范围为 7 到 35 天。 默认值为 7 天。
启用或禁用异地冗余备份。 默认值为 Disabled。 基本定价层不支持。
一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
服务器的名称。 名称只能包含小写字母、数字和连字符 (-)。 最少 3 个字符,最多 63 个字符。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
不等待长时间运行的操作完成。
属性 | 值 |
---|---|
默认值: | False |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
SKU 的名称。 默认为源服务器的 SKU。 Follows the convention {pricing tier}{compute generation}{vCores} in shorthand. 示例:B_Gen5_1、GP_Gen5_4、MO_Gen5_16。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az mysql server list
列出可用的服务器。
az mysql server list [--resource-group]
示例
列出订阅中的所有 MySQL 服务器。
az mysql server list
列出资源组中的所有 MySQL 服务器。
az mysql server list -g testgroup
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az mysql server list-skus
列出给定区域中的可用 SKU。
az mysql server list-skus --location
示例
列出给定区域中的可用 SKU。
az mysql server list-skus -l eastus
必需参数
位置的名称。 Required.
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az mysql server restart
重启服务器。
az mysql server restart [--ids]
[--name]
[--resource-group]
[--subscription]
示例
重启服务器。
az mysql server restart -g testgroup -n testsvr
重启服务器。 (autogenerated)
az mysql server restart --name testsvr --resource-group testgroup --subscription MySubscription
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
服务器的名称。 名称只能包含小写字母、数字和连字符 (-)。 最少 3 个字符,最多 63 个字符。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az mysql server restore
从备份还原服务器。
az mysql server restore --pitr-time --restore-point-in-time
--source-server
[--ids]
[--name]
[--no-wait]
[--resource-group]
[--subscription]
示例
将“testsvr”还原到作为新服务器“testsvrnew”的特定时间点。
az mysql server restore -g testgroup -n testsvrnew --source-server testsvr --restore-point-in-time "2017-06-15T13:10:00Z"
将“testsvr2”还原到“testsvrnew”,其中“testsvrnew”位于不同于“testsvr2”的资源组中。
az mysql server restore -g testgroup -n testsvrnew \
-s "/subscriptions/${SubID}/resourceGroups/${ResourceGroup}/providers/Microsoft.DBforMySQL/servers/testsvr2" \
--restore-point-in-time "2017-06-15T13:10:00Z"
必需参数
从 UTC 还原的时间点(ISO8601格式),例如 2017-04-26T02:10:00+08:00。
要从中还原的源服务器的名称或资源 ID。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
服务器的名称。 名称只能包含小写字母、数字和连字符 (-)。 最少 3 个字符,最多 63 个字符。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
不等待长时间运行的操作完成。
属性 | 值 |
---|---|
默认值: | False |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az mysql server show
获取服务器的详细信息。
az mysql server show [--ids]
[--name]
[--resource-group]
[--subscription]
示例
获取服务器的详细信息
az mysql server show --name MyServer --resource-group MyResourceGroup
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
服务器的名称。 名称只能包含小写字母、数字和连字符 (-)。 最少 3 个字符,最多 63 个字符。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az mysql server show-connection-string
显示 MySQL 服务器数据库的连接字符串。
az mysql server show-connection-string [--admin-password]
[--admin-user]
[--database-name]
[--ids]
[--server-name]
[--subscription]
示例
显示 cmd 和编程语言的连接字符串。
az mysql server show-connection-string -s testServer -u username -p password -d databasename
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
管理员的登录密码。
属性 | 值 |
---|---|
默认值: | {password} |
管理员的登录用户名。
属性 | 值 |
---|---|
默认值: | {username} |
数据库的名称。
属性 | 值 |
---|---|
默认值: | {database} |
一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
服务器的名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
默认值: | {server} |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az mysql server start
启动已停止的服务器。
az mysql server start [--ids]
[--name]
[--resource-group]
[--subscription]
示例
启动已停止的服务器。 (autogenerated)
az mysql server start --name testsvr --resource-group testgroup --subscription MySubscription
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
服务器的名称。 名称只能包含小写字母、数字和连字符 (-)。 最少 3 个字符,最多 63 个字符。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az mysql server stop
停止正在运行的服务器。
az mysql server stop [--ids]
[--name]
[--resource-group]
[--subscription]
示例
停止正在运行的服务器。 (autogenerated)
az mysql server stop --name testsvr --resource-group testgroup --subscription MySubscription
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
服务器的名称。 名称只能包含小写字母、数字和连字符 (-)。 最少 3 个字符,最多 63 个字符。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az mysql server update
更新服务器。
az mysql server update [--add]
[--admin-password]
[--assign-identity]
[--auto-grow {Disabled, Enabled}]
[--backup-retention]
[--force-string]
[--ids]
[--minimal-tls-version {TLS1_0, TLS1_1, TLS1_2, TLSEnforcementDisabled}]
[--name]
[--public --public-network-access]
[--remove]
[--resource-group]
[--set]
[--sku-name]
[--ssl-enforcement {Disabled, Enabled}]
[--storage-size]
[--subscription]
[--tags]
示例
更新服务器的 SKU。
az mysql server update -g testgroup -n testsvrnew --sku-name GP_Gen5_4
更新服务器的标记。
az mysql server update -g testgroup -n testsvrnew --tags "k1=v1" "k2=v2"
更新服务器。 (autogenerated)
az mysql server update --name testsvrnew --resource-group testgroup --ssl-enforcement Enabled --minimal-tls-version TLS1_0
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
通过指定路径和键值对将对象添加到对象列表。 示例:--add property.listProperty <key=value, string or JSON string>
。
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | [] |
管理员的密码。 最少 8 个字符,最多 128 个字符。 密码必须包含以下类别中的三个类别的字符:英文大写字母、英文小写字母、数字和非字母数字字符。
为此服务器生成并分配一个Microsoft Entra Identity,以用于 Azure KeyVault 等密钥管理服务。
属性 | 值 |
---|---|
默认值: | False |
启用或禁用存储的自动增长。 默认值为“已启用”。
属性 | 值 |
---|---|
接受的值: | Disabled, Enabled |
备份保留的天数。 范围为 7 到 35 天。 默认值为 7 天。
使用“set”或“add”时,保留字符串文本,而不是尝试转换为 JSON。
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | False |
一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
启用 SSL 时,为连接到服务器的最小 TLS 版本设置。 默认值为 TLSEnforcementDisabled。
属性 | 值 |
---|---|
接受的值: | TLS1_0, TLS1_1, TLS1_2, TLSEnforcementDisabled |
服务器的名称。 名称只能包含小写字母、数字和连字符 (-)。 最少 3 个字符,最多 63 个字符。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
启用或禁用对服务器的公用网络访问。 禁用后,只有通过专用链接建立的连接才能访问此服务器。 允许的值为:Enabled
、、、Disabled
all
0.0.0.0
、。 <SingleIP>
<StartIP-DestinationIP>
默认值为 Enabled
。
从列表中删除属性或元素。 示例: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | [] |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
通过指定要设置的属性路径和值来更新对象。 示例:--set property1.property2=<value>
。
属性 | 值 |
---|---|
Parameter group: | Generic Update Arguments |
默认值: | [] |
SKU 的名称。 Follows the convention {pricing tier}{compute generation}{vCores} in shorthand. 示例:B_Gen5_1、GP_Gen5_4、MO_Gen5_16。
启用或禁用与服务器的连接的 ssl 强制实施。 默认值为“已启用”。
属性 | 值 |
---|---|
接受的值: | Disabled, Enabled |
服务器的存储容量(以 MB 为单位)。 最小值为 5120,以 1024 为增量递增。 默认值为 5120。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
空格分隔标记:key[=value] [key[=value] ...]。使用“”清除现有标记。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az mysql server upgrade
将 mysql 服务器升级到更高版本,例如 5.6 到 5.7。
az mysql server upgrade --target-server-version
[--ids]
[--name]
[--resource-group]
[--subscription]
示例
升级 mysql 服务器。
az mysql server upgrade --name testsvr --resource-group testgroup --subscription MySubscription --target-server-version 5.7
必需参数
要将 mysql 服务器升级到的服务器版本,当前仅支持 5.7。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
服务器的名称。 名称只能包含小写字母、数字和连字符 (-)。 最少 3 个字符,最多 63 个字符。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az mysql server wait
等待服务器满足某些条件。
az mysql server wait [--custom]
[--exists]
[--ids]
[--interval]
[--name]
[--resource-group]
[--subscription]
[--timeout]
示例
等待服务器满足某些条件。 (autogenerated)
az mysql server wait --exists --name MyServer --resource-group MyResourceGroup
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
等待条件满足自定义 JMESPath 查询。 例如 provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running']。
属性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
等待资源存在。
属性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
默认值: | False |
一个或多个资源 ID(空格分隔)。 它应该是包含“资源 ID”参数的所有信息的完整资源 ID。 应提供 --id 或其他“资源 ID”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
轮询间隔(以秒为单位)。
属性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
默认值: | 30 |
服务器的名称。 名称只能包含小写字母、数字和连字符 (-)。 最少 3 个字符,最多 63 个字符。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
最大等待(以秒为单位)。
属性 | 值 |
---|---|
Parameter group: | Wait Condition Arguments |
默认值: | 3600 |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
只显示错误,取消显示警告。
属性 | 值 |
---|---|
默认值: | False |
Output format.
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |