az mysql

Manage Azure Database for MySQL servers.

Commands

az mysql db

Manage MySQL databases on a server.

az mysql db create

Create a MySQL database.

az mysql db delete

Delete a database.

az mysql db list

List the databases for a server.

az mysql db show

Show the details of a database.

az mysql down

Delete the MySQL server and its cached information.

az mysql flexible-server

Manage Azure Database for MySQL Flexible Servers.

az mysql flexible-server ad-admin

Manage server Active Directory administrator.

az mysql flexible-server ad-admin create

Create an Active Directory administrator.

az mysql flexible-server ad-admin delete

Delete an Active Directory administrator.

az mysql flexible-server ad-admin list

List all Active Directory administrators.

az mysql flexible-server ad-admin show

Get an Active Directory administrator.

az mysql flexible-server ad-admin wait

Wait for the Active Directory administrator to satisfy certain conditions.

az mysql flexible-server backup

Manage flexible server backups.

az mysql flexible-server backup create

Create a backup for a given server with specified backup name.

az mysql flexible-server backup list

List all the backups for a given server.

az mysql flexible-server backup show

Show the details of a specific backup for a given server.

az mysql flexible-server connect

Connect to a flexible server.

az mysql flexible-server create

Create a MySQL flexible server.

az mysql flexible-server db

Manage MySQL databases on a flexible server.

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 delete

Delete a flexible server.

az mysql flexible-server deploy

Enable and run GitHub Actions workflow for MySQL server.

az mysql flexible-server deploy run

Run an existing workflow in your github repository.

az mysql flexible-server deploy setup

Create GitHub Actions workflow file for MySQL server.

az mysql flexible-server execute

Connect to a flexible server.

az mysql flexible-server firewall-rule

Manage firewall rules for a server.

az mysql flexible-server firewall-rule create

Create a new firewall rule for a flexible server.

az mysql flexible-server firewall-rule delete

Delete a firewall rule.

az mysql flexible-server firewall-rule list

List all firewall rules for a flexible server.

az mysql flexible-server firewall-rule show

Get the details of a firewall rule.

az mysql flexible-server firewall-rule update

Update a firewall rule.

az mysql flexible-server geo-restore

Geo-restore a flexible server from backup.

az mysql flexible-server identity

Manage server user assigned identities.

az mysql flexible-server identity assign

Add user asigned managed identities to the server.

az mysql flexible-server identity list

List all user assigned managed identities from the server.

az mysql flexible-server identity remove

Remove user asigned managed identites from the server.

az mysql flexible-server identity show

Get an user assigned managed identity from the server.

az mysql flexible-server list

List available flexible servers.

az mysql flexible-server list-skus

Lists available sku's in the given region.

az mysql flexible-server parameter

Commands for managing server parameter values for flexible server.

az mysql flexible-server parameter list

List the parameter values for a flexible server.

az mysql flexible-server parameter set

Update the parameter of a flexible server.

az mysql flexible-server parameter show

Get the parameter for a flexible server.".

az mysql flexible-server replica

Manage read replicas.

az mysql flexible-server replica create

Create a read replica for a server.

az mysql flexible-server replica list

List all read replicas for a given server.

az mysql flexible-server replica stop-replication

Stop replication to a read replica and make it a read/write server.

az mysql flexible-server restart

Restart a flexible server.

az mysql flexible-server restore

Restore a flexible server from backup.

az mysql flexible-server server-logs

Manage server logs.

az mysql flexible-server server-logs download

Download log files.

az mysql flexible-server server-logs list

List log files for a server.

az mysql flexible-server show

Get the details of a flexible server.

az mysql flexible-server show-connection-string

Show the connection strings for a MySQL flexible-server database.

az mysql flexible-server start

Start a flexible server.

az mysql flexible-server stop

Stop a flexible server.

az mysql flexible-server update

Update a flexible server.

az mysql flexible-server upgrade

Upgrade the major version of a flexible server.

az mysql flexible-server wait

Wait for the flexible server to satisfy certain conditions.

az mysql server

Manage MySQL servers.

az mysql server ad-admin

Manage a MySQL server's Active Directory administrator.

az mysql server ad-admin create

Create an Active Directory administrator for MySQL server.

az mysql server ad-admin delete

Delete an Active Directory Administrator for MySQL server.

az mysql server ad-admin list

List all Active Directory Administrators for MySQL server.

az mysql server ad-admin show

Get Active Directory Administrator information for a MySQL server.

az mysql server ad-admin wait

Place the CLI in a waiting state until a condition of the MySQL server Active Directory Administrator is met.

az mysql server configuration

Manage configuration values for a server.

az mysql server configuration list

List the configuration values for a server.

az mysql server configuration set

Update the configuration of a server.

az mysql server configuration show

Get the configuration for a server.".

az mysql server create

Create a server.

az mysql server delete

Delete a server.

az mysql server firewall-rule

Manage firewall rules for a server.

az mysql server firewall-rule create

Create a new firewall rule for a server.

az mysql server firewall-rule delete

Delete a firewall rule.

az mysql server firewall-rule list

List all firewall rules for a server.

az mysql server firewall-rule show

Get the details of a firewall rule.

az mysql server firewall-rule update

Update a firewall rule.

az mysql server georestore

Geo-restore a server from backup.

az mysql server key

Manage MySQL server keys.

az mysql server key create

Create server key.

az mysql server key delete

Delete server key.

az mysql server key list

Gets a list of Server keys.

az mysql server key show

Show server key.

az mysql server list

List available servers.

az mysql server list-skus

List available sku's in the given region.

az mysql server private-endpoint-connection

Manage MySQL server private endpoint connections.

az mysql server private-endpoint-connection approve

Approve the specified private endpoint connection associated with a MySQL server.

az mysql server private-endpoint-connection delete

Delete the specified private endpoint connection associated with a MySQL server.

az mysql server private-endpoint-connection reject

Reject the specified private endpoint connection associated with a MySQL server.

az mysql server private-endpoint-connection show

Show details of a private endpoint connection associated with a MySQL server.

az mysql server private-link-resource

Manage MySQL server private link resources.

az mysql server private-link-resource list

List the private link resources supported for a MySQL server.

az mysql server replica

Manage read replicas.

az mysql server replica create

Create a read replica for a server.

az mysql server replica list

List all read replicas for a given server.

az mysql server replica stop

Stop replication to a read replica and make it a read/write server.

az mysql server restart

Restart a server.

az mysql server restore

Restore a server from backup.

az mysql server show

Get the details of a server.

az mysql server show-connection-string

Show the connection strings for a MySQL server database.

az mysql server start

Start a stopped server.

az mysql server stop

Stop a running server.

az mysql server update

Update a server.

az mysql server upgrade

Upgrade mysql server to a higher version, like 5.6 to 5.7.

az mysql server vnet-rule

Manage a server's virtual network rules.

az mysql server vnet-rule create

Create a virtual network rule to allows access to a MySQL server.

az mysql server vnet-rule delete

Deletes the virtual network rule with the given name.

az mysql server vnet-rule list

Gets a list of virtual network rules in a server.

az mysql server vnet-rule show

Gets a virtual network rule.

az mysql server vnet-rule update

Update a virtual network rule.

az mysql server wait

Wait for server to satisfy certain conditions.

az mysql server-logs

Manage server logs.

az mysql server-logs download

Download log files.

az mysql server-logs list

List log files for a server.

az mysql show-connection-string

Show the connection strings for a MySQL server database.

az mysql up

Set up an Azure Database for MySQL server and configurations.

az mysql down

Delete the MySQL server and its cached information.

az mysql down [--delete-group]
              [--no-wait]
              [--resource-group]
              [--server-name]
              [--yes]

Examples

Delete the server and the cached data, aside from the resource group.

az mysql down

Delete the resource group and the full cache.

az mysql down --delete-group

Optional Parameters

--delete-group

Delete the resource group.

--no-wait

Do not wait for the long-running operation to finish.

default value: False
--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.

--yes -y

Do not prompt for confirmation.

default value: False

az mysql show-connection-string

Show the connection strings for a MySQL server database.

az mysql show-connection-string [--admin-password]
                                [--admin-user]
                                [--database-name]
                                [--server-name]

Optional Parameters

--admin-password -p

The login password of the administrator.

default value: {password}
--admin-user -u

The login username of the administrator.

default value: {login}
--database-name -d

The name of a database.

default value: {database}
--server-name -s

Name of the server.

default value: {server}

az mysql up

Set up an Azure Database for MySQL server and configurations.

az mysql up [--admin-password]
            [--admin-user]
            [--backup-retention]
            [--database-name]
            [--generate-password]
            [--geo-redundant-backup {Disabled, Enabled}]
            [--location]
            [--resource-group]
            [--server-name]
            [--sku-name]
            [--ssl-enforcement {Disabled, Enabled}]
            [--storage-size]
            [--tags]
            [--version]

Examples

Ensure that a Azure Database for MySQL server is up and running and configured for immediate use.

az mysql up

To override default names, provide parameters indicating desired values/existing resources.

az mysql up -g MyResourceGroup -s MyServer -d MyDatabase -u MyUsername -p MyPassword

Optional Parameters

--admin-password -p

The login password of the administrator. Minimum 8 characters and maximum 128 characters. Password must contain characters from three of the following categories: English uppercase letters, English lowercase letters, numbers, and non-alphanumeric characters.Your password cannot contain all or part of the login name. Part of a login name is defined as three or more consecutive alphanumeric characters.

--admin-user -u

The login username of the administrator.

--backup-retention

The number of days a backup is retained.

--database-name -d

The name of a database to initialize.

--generate-password

Generate a password.

--geo-redundant-backup

Enable Geo-redundant or not for server backup.

accepted values: Disabled, Enabled
default value: Disabled
--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--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.

--sku-name

The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.

default value: GP_Gen5_2
--ssl-enforcement

Enable ssl enforcement or not when connect to server.

accepted values: Disabled, Enabled
default value: Enabled
--storage-size

The max storage size of the server. Unit is megabytes.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--version

Server version.

default value: 5.7