Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
az mysql flexible-server db
Manage MySQL databases on a flexible server.
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az mysql flexible-server db create |
Create a MySQL database on a flexible server. |
Core | GA |
| az mysql flexible-server db delete |
Delete a database on a flexible server. |
Core | GA |
| az mysql flexible-server db list |
List the databases for a flexible server. |
Core | GA |
| az mysql flexible-server db show |
Show the details of a database. |
Core | GA |
az mysql flexible-server db create
Create a MySQL database on a flexible server.
az mysql flexible-server db create --resource-group
--server-name
[--acquire-policy-token]
[--change-reference]
[--charset]
[--collation]
[--database-name]
Examples
Create database 'testDatabase' in the flexible server 'testserver' with default charset utf8 and collation utf8_general_cis.
az mysql flexible-server db create --resource-group testGroup --server-name testserver --database-name testDatabase
Create database 'testDatabase' in the flexible server 'testserver' with a given character set and collation rules.
az mysql flexible-server db create --resource-group testGroup --server-name testserver --database-name testDatabase --charset validCharset --collation validCollation
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The charset of the database. The default value is UTF8.
The collation of the database.
The name of the database to be created when provisioning the database server.
az mysql flexible-server db delete
Delete a database on a flexible server.
az mysql flexible-server db delete [--acquire-policy-token]
[--change-reference]
[--database-name]
[--ids]
[--resource-group]
[--server-name]
[--subscription]
[--yes]
Examples
Delete database 'testDatabase' in the flexible server 'testserver'.
az mysql flexible-server db delete --resource-group testGroup --server-name testserver --database-name testDatabase
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The name of the database to be created when provisioning the database server.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
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.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Do not prompt for confirmation.
az mysql flexible-server db list
List the databases for a flexible server.
az mysql flexible-server db list --resource-group
--server-name
Examples
List databases in the flexible server 'testserver'.
az mysql flexible-server db list --resource-group testGroup --server-name testserver
List databases in the flexible server 'testserver' in table format.
az mysql flexible-server db list --resource-group testGroup --server-name testserver --output table
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
az mysql flexible-server db show
Show the details of a database.
az mysql flexible-server db show [--database-name]
[--ids]
[--resource-group]
[--server-name]
[--subscription]
Examples
Show database 'testDatabase' in the server 'testserver'.
az mysql flexible-server db show --resource-group testGroup --server-name testserver --database-name testDatabase
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
The name of the database to be created when provisioning the database server.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
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.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
| Property | Value |
|---|---|
| Parameter group: | Resource Id Arguments |
Feedback
Was this page helpful?
