az mysql flexible-server db
管理灵活服务器上的 MySQL 数据库。
命令
名称 | 说明 | 类型 | Status |
---|---|---|---|
az mysql flexible-server db create |
在灵活服务器上创建 MySQL 数据库。 |
Core | GA |
az mysql flexible-server db delete |
删除灵活服务器上的数据库。 |
Core | GA |
az mysql flexible-server db list |
列出灵活服务器的数据库。 |
Core | GA |
az mysql flexible-server db show |
显示数据库的详细信息。 |
Core | GA |
az mysql flexible-server db create
在灵活服务器上创建 MySQL 数据库。
az mysql flexible-server db create --resource-group
--server-name
[--charset]
[--collation]
[--database-name]
示例
在灵活服务器“testerver”中创建数据库“testDatabase”,默认字符集 utf8 和排序规则utf8_general_cis。
az mysql flexible-server db create --resource-group testGroup --server-name testserver --database-name testDatabase
在具有给定字符集和排序规则的灵活服务器“testerver”中创建数据库“testDatabase”。
az mysql flexible-server db create --resource-group testGroup --server-name testserver --database-name testDatabase --charset validCharset --collation validCollation
必需参数
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
服务器的名称。 名称只能包含小写字母、数字和连字符 (-)。 最少 3 个字符,最多 63 个字符。
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
数据库的字符集。 默认值为 UTF8。
数据库的排序规则。
预配数据库服务器时要创建的数据库的名称。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
输出格式。
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az mysql flexible-server db delete
删除灵活服务器上的数据库。
az mysql flexible-server db delete [--database-name]
[--ids]
[--resource-group]
[--server-name]
[--subscription]
[--yes]
示例
删除灵活服务器“testserver”中的数据库“testDatabase”。
az mysql flexible-server db delete --resource-group testGroup --server-name testserver --database-name testDatabase
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
预配数据库服务器时要创建的数据库的名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
服务器的名称。 名称只能包含小写字母、数字和连字符 (-)。 最少 3 个字符,最多 63 个字符。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
不要提示确认。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
输出格式。
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az mysql flexible-server db list
列出灵活服务器的数据库。
az mysql flexible-server db list --resource-group
--server-name
示例
列出灵活服务器“testserver”中的数据库。
az mysql flexible-server db list --resource-group testGroup --server-name testserver
以表格式列出灵活服务器“testerver”中的数据库。
az mysql flexible-server db list --resource-group testGroup --server-name testserver --output table
必需参数
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
服务器的名称。 名称只能包含小写字母、数字和连字符 (-)。 最少 3 个字符,最多 63 个字符。
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
输出格式。
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |
az mysql flexible-server db show
显示数据库的详细信息。
az mysql flexible-server db show [--database-name]
[--ids]
[--resource-group]
[--server-name]
[--subscription]
示例
在服务器“testserver”中显示数据库“testDatabase”。
az mysql flexible-server db show --resource-group testGroup --server-name testserver --database-name testDatabase
可选参数
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
预配数据库服务器时要创建的数据库的名称。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
一个或多个资源 ID(以空格分隔)。 它应该是包含“Resource Id”参数的所有信息的完整资源 ID。 应提供 --ids 或其他“Resource Id”参数。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
资源组的名称。 可以使用 az configure --defaults group=<name>
配置默认组。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
服务器的名称。 名称只能包含小写字母、数字和连字符 (-)。 最少 3 个字符,最多 63 个字符。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID
配置默认订阅。
属性 | 值 |
---|---|
Parameter group: | Resource Id Arguments |
全局参数
提高日志记录详细程度以显示所有调试日志。
属性 | 值 |
---|---|
默认值: | False |
显示此帮助消息并退出。
仅显示错误,禁止显示警告。
属性 | 值 |
---|---|
默认值: | False |
输出格式。
属性 | 值 |
---|---|
默认值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/。
增加日志记录详细程度。 使用 --debug 获取完整的调试日志。
属性 | 值 |
---|---|
默认值: | False |