az mariadb db

Manage MariaDB databases on a server.

Commands

az mariadb db create Create a MariaDB database.
az mariadb db delete Delete a database.
az mariadb db list List the databases for a server.
az mariadb db show Show the details of a database.

az mariadb db create

Create a MariaDB database.

az mariadb db create --name
--resource-group
--server-name
[--charset]
[--collation]
[--subscription]

Examples

Create database 'testdb' in the server 'testsvr' with the default parameters.

az mariadb db create -g testgroup -s testsvr -n testdb

Create database 'testdb' in server 'testsvr' with a given character set and collation rules.

az mariadb db create -g testgroup -s testsvr -n testdb --charset {valid_charset} --collation {valid_collation}

Required Parameters

--name -n

The name of the 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. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

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 mariadb db delete

Delete a database.

az mariadb db delete --name
--resource-group
--server-name
[--subscription]
[--yes]

Examples

Delete database 'testdb' in the server 'testsvr'.

az mariadb db delete -g testgroup -s testsvr -n testdb

Required Parameters

--name -n

The name of the 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. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

Optional Parameters

--subscription

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

--yes -y

Do not prompt for confirmation.

az mariadb db list

List the databases for a server.

az mariadb db list --resource-group
--server-name
[--subscription]

Examples

List databases in the server 'testsvr'.

az mariadb db list -g testgroup -s testsvr

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

--subscription

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

az mariadb db show

Show the details of a database.

az mariadb db show --name
--resource-group
--server-name
[--subscription]

Examples

Show database 'testdb' in the server 'testsvr'.

az mariadb db show -g testgroup -s testsvr -n testdb

Required Parameters

--name -n

The name of the 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. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.

Optional Parameters

--subscription

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