az mysql flexible-server db

Manage MySQL databases on a flexible server.

Commands

az mysql flexible-server db create

Create a MySQL database on a flexible server.

az mysql flexible-server db delete

Delete a database on a flexible server.

az mysql flexible-server db list

List the databases for a flexible server.

az mysql flexible-server db show

Show the details of a database.

az mysql flexible-server db create

Create a MySQL database on a flexible server.

az mysql flexible-server db create --database-name
                                   --resource-group
                                   --server-name
                                   [--charset]
                                   [--collation]
                                   [--subscription]

Examples

Create database 'testDatabase' in the flexible server 'testServer' with the default parameters.

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

--database-name -d

The name of a database.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--server-name -s

Name of the server.

Optional Parameters

--charset

The charset of the database.

--collation

The collation of the database.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az mysql flexible-server db delete

Delete a database on a flexible server.

az mysql flexible-server db delete [--database-name]
                                   [--force]
                                   [--ids]
                                   [--resource-group]
                                   [--server-name]
                                   [--subscription]

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

--database-name -d

The name of a database.

--force

Delete the database without prompt.

--ids

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.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--server-name -s

Name of the server.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az mysql flexible-server db list

List the databases for a flexible server.

az mysql flexible-server db list --resource-group
                                 --server-name
                                 [--query-examples]
                                 [--subscription]

Examples

List databases in the flexible server 'testServer'.

az mysql flexible-server db list --resource-group testGroup --server-name testServer

Required Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--server-name -s

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

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az mysql flexible-server db show

Show the details of a database.

az mysql flexible-server db show --database-name
                                 [--ids]
                                 [--query-examples]
                                 [--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

Required Parameters

--database-name -d

The name of a database.

Optional Parameters

--ids

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.

--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--server-name -s

Name of the server.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.