az mysql flexible-server
Manage Azure Database for MySQL Flexible Servers.
Commands
| 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 action 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 action 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 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 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 wait |
Wait for the flexible server to satisfy certain conditions. |
az mysql flexible-server connect
Connect to a flexible server.
az mysql flexible-server connect --admin-user
--name
[--admin-password]
[--database-name]
[--interactive]
[--querytext]
Required Parameters
The login username of the administrator.
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 login password of the administrator.
The name of a database.
Pass this parameter to connect to database in interactive mode.
A query to run against the flexible server.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az mysql flexible-server create
Create a MySQL flexible server.
Create a MySQL flexible server with custom or default configuration. For more information for network configuration, see
- Configure public access https://docs.microsoft.com/en-us/azure/mysql/flexible-server/how-to-manage-firewall-cli
- Configure private access https://docs.microsoft.com/en-us/azure/mysql/flexible-server/how-to-manage-virtual-network-cli.
az mysql flexible-server create [--address-prefixes]
[--admin-password]
[--admin-user]
[--backup-retention]
[--database-name]
[--geo-redundant-backup {Disabled, Enabled}]
[--high-availability {Disabled, Enabled, SameZone, ZoneRedundant}]
[--iops]
[--location]
[--name]
[--private-dns-zone]
[--public-access]
[--resource-group]
[--sku-name]
[--standby-zone]
[--storage-auto-grow {Disabled, Enabled}]
[--storage-size]
[--subnet]
[--subnet-prefixes]
[--tags]
[--tier]
[--version]
[--vnet]
[--yes]
[--zone]
Examples
Create a MySQL flexible server with custom parameters
az mysql flexible-server create --location northeurope --resource-group testGroup \
--name testserver --admin-user username --admin-password password \
--sku-name Standard_B1ms --tier Burstable --public-access 0.0.0.0 --storage-size 32 \
--tags "key=value" --version 5.7 --high-availability ZoneRedundant --zone 1 \
--standby-zone 3 --storage-auto-grow Enabled --iops 500
Create a MySQL flexible server with default parameters and public access enabled by default. Resource group, server name, username, password, and default database will be created by CLI
az mysql flexible-server create
Create a MySQL flexible server with public access and add the range of IP address to have access to this server. The --public-access parameter can be 'All', 'None', <startIpAddress>, or <startIpAddress>-<endIpAddress>
az mysql flexible-server create --resource-group testGroup --name testserver --public-access 125.23.54.31-125.23.54.35
Create a MySQL flexible server with private access. If provided virtual network and subnet do not exists, virtual network and subnet with the specified address prefixes will be created.
az mysql flexible-server create --resource-group testGroup --name testserver --vnet myVnet --subnet mySubnet --address-prefixes 10.0.0.0/16 --subnet-prefixes 10.0.0.0/24
Create a MySQL flexible server using a new subnet resource ID and new private DNS zone resource ID. The subnet and DNS zone can be created in different subscription or resource group.
az mysql flexible-server create \
--resource-group testGroup --name testserver \
--subnet /subscriptions/{SubID}/resourceGroups/{ResourceGroup}/providers/Microsoft.Network/virtualNetworks/{VNetName}/subnets/{SubnetName} \
--private-dns-zone /subscriptions/{SubID}/resourceGroups/{resourceGroup}/providers/Microsoft.Network/privateDnsZones/testMySQLFlexibleDnsZone.private.mysql.database.azure.com \
--address-prefixes 172.0.0.0/16 --subnet-prefixes 172.0.0.0/24
Create a MySQL flexible server using existing network resources in the same resource group. The provided subnet should not have any other resource deployed in it and this subnet will be delegated to Microsoft.DBforMySQL/flexibleServers, if not already delegated. The private DNS zone will be linked to the virtual network if not already linked.
# create vnet
az network vnet create --resource-group testGroup --name testVnet --location testLocation --address-prefixes 172.0.0.0/16
# create subnet
az network vnet subnet create --resource-group testGroup --vnet-name testVnet --address-prefixes 172.0.0.0/24 --name testSubnet
# create private dns zone
az network private-dns zone create -g testGroup -n testDNS.private.mysql.database.azure.com
az mysql flexible-server create --resource-group testGroup \
--name testserver --location testLocation \
--subnet /subscriptions/{SubId}/resourceGroups/{testGroup}/providers/Microsoft.Network/virtualNetworks/tesetVnet/subnets/testSubnet \
--private-dns-zone /subscriptions/{SubId}/resourceGroups/{testGroup}/providers/Microsoft.Network/privateDnsZones/testDNS.mysql.database.azure.com\
az mysql flexible-server create --resource-group testGroup --name testserver \
--vnet testVnet --subnet testSubnet --location testLocation \
--private-dns-zone /subscriptions/{SubId}/resourceGroups/{testGroup}/providers/Microsoft.Network/privateDnsZones/testDNS.mysql.database.azure.com
Create a MySQL flexible server using existing network resources in the different resource group / subscription.
az mysql flexible-server create --resource-group testGroup \
--name testserver --location testLocation \
--subnet /subscriptions/{SubId2}/resourceGroups/{testGroup2}/providers/Microsoft.Network/virtualNetworks/tesetVnet/subnets/testSubnet \
--private-dns-zone /subscriptions/{SubId2}/resourceGroups/{testGroup2}/providers/Microsoft.Network/privateDnsZones/testDNS.mysql.database.azure.com
Optional Parameters
The IP address prefix to use when creating a new virtual network in CIDR format. Default value is 10.0.0.0/16.
The 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.
Administrator username for the server. Once set, it cannot be changed.
The number of days a backup is retained. Range of 1 to 35 days. Default is 7 days.
The name of the database to be created when provisioning the database server.
Whether or not geo redundant backup is enabled.
Enable (ZoneRedundant or SameZone) or disable high availability feature. Default value is Disabled. High availability can only be set during flexible server create time.
Number of IOPS to be allocated for this server. You will get certain amount of free IOPS based on compute and storage provisioned. The default value for IOPS is free IOPS. To learn more about IOPS based on compute and storage, refer to IOPS in Azure Database for MySQL Flexible Server.
Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
This parameter only applies for a server with private access. The name or id of new or existing private dns zone. You can use the private dns zone from same resource group, different resource group, or different subscription. If you want to use a zone from different resource group or subscription, please provide resource Id. CLI creates a new private dns zone within the same resource group as virtual network if not provided by users.
Determines the public access. Enter single or range of IP addresses to be included in the allowed list of IPs. IP address ranges must be dash-separated and not contain any spaces. Specifying 0.0.0.0 allows public access from any resources deployed within Azure to access your server. Setting it to "None" sets the server in public access mode but does not create a firewall rule.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
The name of the compute SKU. Follows the convention Standard_{VM name}. Examples: Standard_D4s_v3.
The availability zone information of the standby server when high availability is enabled.
Enable or disable autogrow of the storage. Default value is Enabled.
The storage capacity of the server. Minimum is 32 GiB and max is 16 TiB.
Name or resource ID of a new or existing subnet. If you want to use a subnet from different resource group or subscription, please provide resource ID instead of name. Please note that the subnet will be delegated to flexibleServers. After delegation, this subnet cannot be used for any other type of Azure resources.
The subnet IP address prefix to use when creating a new subnet in CIDR format. Default value is 10.0.0.0/24.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Compute tier of the server. Accepted values: Burstable, GeneralPurpose, Memory Optimized.
Server major version.
Name or ID of a new or existing virtual network. If you want to use a vnet from different resource group or subscription, please provide a resource ID. The name must be between 2 to 64 characters. The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens.
Do not prompt for confirmation.
Availability zone into which to provision the resource.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az mysql flexible-server delete
Delete a flexible server.
az mysql flexible-server delete [--ids]
[--name]
[--resource-group]
[--yes]
Examples
Delete a flexible server.
az mysql flexible-server delete --resource-group testGroup --name testserver
Delete a flexible server without confirmation prompt.
az mysql flexible-server delete --resource-group testGroup --name testserver --yes
Optional Parameters
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.
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Do not prompt for confirmation.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az mysql flexible-server execute
Connect to a flexible server.
az mysql flexible-server execute --admin-password
--admin-user
--name
[--database-name]
[--file-path]
[--querytext]
Required Parameters
The login password of the administrator.
The login username of the administrator.
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 name of a database.
The path of the sql file to execute.
A query to run against the flexible server.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az mysql flexible-server geo-restore
Geo-restore a flexible server from backup.
az mysql flexible-server geo-restore --location
--source-server
[--address-prefixes]
[--ids]
[--name]
[--no-wait]
[--private-dns-zone]
[--public-access {Disabled, Enabled}]
[--resource-group]
[--subnet]
[--subnet-prefixes]
[--vnet]
[--yes]
[--zone]
Examples
Geo-restore 'testserver' to a new server 'testserverNew' in location 'newLocation' with the same network configuration. Private access server will use different private dns zone.
az mysql flexible-server geo-restore --resource-group testGroup --name testserverNew --source-server testserver --location newLocation
Geo-estore public access or private access server 'testserver' as a new server 'testserverNew' with new subnet. New vnet, subnet, and private dns zone for the restored server will be provisioned. Please refer to 'flexible-server create' command for more private access scenarios.
az mysql flexible-server geo-restore --resource-group testGroup --name testserverNew \
--source-server testserver --vnet newVnet --subnet newSubnet \
--address-prefixes 172.0.0.0/16 --subnet-prefixes 172.0.0.0/24 \
--private-dns-zone testDNS.mysql.database.azure.com --location newLocation
Gep-estore private access server 'testserver' as a new server 'testserverNew' with public access.
az mysql flexible-server geo-restore --resource-group testGroup --name testserverNew --source-server testserver --public-access Enabled --location newLocation
Required Parameters
Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.
The name or resource ID of the source server to restore from.
Optional Parameters
The IP address prefix to use when creating a new virtual network in CIDR format. Default value is 10.0.0.0/16.
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.
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Do not wait for the long-running operation to finish.
This parameter only applies for a server with private access. The name or id of new or existing private dns zone. You can use the private dns zone from same resource group, different resource group, or different subscription. If you want to use a zone from different resource group or subscription, please provide resource Id. CLI creates a new private dns zone within the same resource group as virtual network if not provided by users.
Determines the public access.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Name or resource ID of a new or existing subnet. If you want to use a subnet from different resource group or subscription, please provide resource ID instead of name. Please note that the subnet will be delegated to flexibleServers. After delegation, this subnet cannot be used for any other type of Azure resources.
The subnet IP address prefix to use when creating a new subnet in CIDR format. Default value is 10.0.0.0/24.
Name or ID of a new or existing virtual network. If you want to use a vnet from different resource group or subscription, please provide a resource ID. The name must be between 2 to 64 characters. The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens.
Do not prompt for confirmation.
Availability zone into which to provision the resource.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az mysql flexible-server list
List available flexible servers.
az mysql flexible-server list [--resource-group]
Examples
List all MySQL flexible servers in a subscription.
az mysql flexible-server list
List all MySQL flexible servers in a resource group.
az mysql flexible-server list --resource-group testGroup
List all MySQL flexible servers in a resource group in table format.
az mysql flexible-server list --resource-group testGroup --output table
Optional Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az mysql flexible-server list-skus
Lists available sku's in the given region.
az mysql flexible-server list-skus --location
Examples
Lists available sku's in the given region.
az mysql flexible-server list-skus -l eastus
Lists available sku's in the given region in table output
az mysql flexible-server list-skus -l eastus -o table
Required Parameters
Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az mysql flexible-server restart
Restart a flexible server.
az mysql flexible-server restart [--failover]
[--ids]
[--name]
[--resource-group]
Examples
Restart a flexible server.
az mysql flexible-server restart --resource-group testGroup --name testserver
Restart a flexible server with failover
az mysql flexible-server restart --resource-group testGroup --name testserver --failover Forced
Optional Parameters
Forced failover for server restart operation. Allowed values: Forced.
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.
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az mysql flexible-server restore
Restore a flexible server from backup.
az mysql flexible-server restore --source-server
[--address-prefixes]
[--ids]
[--name]
[--no-wait]
[--private-dns-zone]
[--public-access {Disabled, Enabled}]
[--resource-group]
[--restore-time]
[--subnet]
[--subnet-prefixes]
[--vnet]
[--yes]
[--zone]
Examples
Restore 'testserver' to a specific point-in-time as a new server 'testserverNew' with the same network configuration.
az mysql flexible-server restore --resource-group testGroup --name testserverNew --source-server testserver --restore-time "2017-06-15T13:10:00Z"
Restore public access or private access server 'testserver' as a new server 'testserverNew' with new subnet to current point-in-time. New vnet, subnet, and private dns zone for the restored server will be provisioned. Please refer to 'flexible-server create' command for more private access scenarios.
az mysql flexible-server restore --resource-group testGroup --name testserverNew \
--source-server testserver --vnet newVnet --subnet newSubnet \
--address-prefixes 172.0.0.0/16 --subnet-prefixes 172.0.0.0/24 \
--private-dns-zone testDNS.mysql.database.azure.com
Restore private access server 'testserver' to current point-in-time as a new server 'testserverNew' with public access.
az mysql flexible-server restore --resource-group testGroup --name testserverNew \
--source-server testserver --public-access Enabled
Required Parameters
The name or resource ID of the source server to restore from.
Optional Parameters
The IP address prefix to use when creating a new virtual network in CIDR format. Default value is 10.0.0.0/16.
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.
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Do not wait for the long-running operation to finish.
This parameter only applies for a server with private access. The name or id of new or existing private dns zone. You can use the private dns zone from same resource group, different resource group, or different subscription. If you want to use a zone from different resource group or subscription, please provide resource Id. CLI creates a new private dns zone within the same resource group as virtual network if not provided by users.
Determines the public access.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
The point in time in UTC to restore from (ISO8601 format), e.g., 2017-04-26T02:10:00+00:00The default value is set to current time.
Name or resource ID of a new or existing subnet. If you want to use a subnet from different resource group or subscription, please provide resource ID instead of name. Please note that the subnet will be delegated to flexibleServers. After delegation, this subnet cannot be used for any other type of Azure resources.
The subnet IP address prefix to use when creating a new subnet in CIDR format. Default value is 10.0.0.0/24.
Name or ID of a new or existing virtual network. If you want to use a vnet from different resource group or subscription, please provide a resource ID. The name must be between 2 to 64 characters. The name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens.
Do not prompt for confirmation.
Availability zone into which to provision the resource.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az mysql flexible-server show
Get the details of a flexible server.
az mysql flexible-server show [--ids]
[--name]
[--resource-group]
Examples
Get the details of a flexible server
az mysql flexible-server show --resource-group testGroup --name testserver
Optional Parameters
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.
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az mysql flexible-server show-connection-string
Show the connection strings for a MySQL flexible-server database.
az mysql flexible-server show-connection-string [--admin-password]
[--admin-user]
[--database-name]
[--ids]
[--server-name]
Examples
Show connection strings for cmd and programming languages.
az mysql flexible-server show-connection-string -s testserver -u username -p password -d databasename
Optional Parameters
The 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.
Administrator username for the server. Once set, it cannot be changed.
The name of the database to be created when provisioning the database server.
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.
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az mysql flexible-server start
Start a flexible server.
az mysql flexible-server start [--ids]
[--name]
[--resource-group]
Examples
Start a flexible server.
az mysql flexible-server start --resource-group testGroup --name testserver
Optional Parameters
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.
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az mysql flexible-server stop
Stop a flexible server.
az mysql flexible-server stop [--ids]
[--name]
[--resource-group]
Examples
Stop a flexible server.
az mysql flexible-server stop --resource-group testGroup --name testserver
Optional Parameters
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.
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az mysql flexible-server update
Update a flexible server.
az mysql flexible-server update [--add]
[--admin-password]
[--backup-retention]
[--force-string]
[--high-availability {Disabled, Enabled, SameZone, ZoneRedundant}]
[--ids]
[--iops]
[--maintenance-window]
[--name]
[--remove]
[--replication-role]
[--resource-group]
[--set]
[--sku-name]
[--standby-zone]
[--storage-auto-grow {Disabled, Enabled}]
[--storage-size]
[--tags]
[--tier]
Examples
Update a flexible server's sku, using local context for server and resource group.
az mysql flexible-server update --sku-name Standard_D4ds_v4 --tier GeneralPurpose
Update a flexible server's tags.
az mysql flexible-server update --resource-group testGroup --name testserver --tags "k1=v1" "k2=v2"
Optional Parameters
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.
The 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.
The number of days a backup is retained. Range of 1 to 35 days. Default is 7 days.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
Enable (ZoneRedundant or SameZone) or disable high availability feature. Default value is Disabled. High availability can only be set during flexible server create time.
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.
Number of IOPS to be allocated for this server. You will get certain amount of free IOPS based on compute and storage provisioned. The default value for IOPS is free IOPS. To learn more about IOPS based on compute and storage, refer to IOPS in Azure Database for MySQL Flexible Server.
Period of time (UTC) designated for maintenance. Examples: "Sun:23:30" to schedule on Sunday, 11:30pm UTC. To set back to default pass in "Disabled".
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.
The replication role of the server.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Update an object by specifying a property path and value to set. Example: --set property1.property2=.
The name of the compute SKU. Follows the convention Standard_{VM name}. Examples: Standard_D4s_v3.
The availability zone information of the standby server when high availability is enabled.
Enable or disable autogrow of the storage. Default value is Enabled.
The storage capacity of the server. Minimum is 32 GiB and max is 16 TiB.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Compute tier of the server. Accepted values: Burstable, GeneralPurpose, Memory Optimized.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
az mysql flexible-server wait
Wait for the flexible server to satisfy certain conditions.
az mysql flexible-server wait [--created]
[--custom]
[--deleted]
[--exists]
[--ids]
[--interval]
[--name]
[--resource-group]
[--timeout]
[--updated]
Examples
Wait for the flexible server to satisfy certain conditions.
az mysql flexible-server wait --exists --resource-group testGroup --name testserver
Optional Parameters
Wait until created with 'provisioningState' at 'Succeeded'.
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
Wait until deleted.
Wait until the resource exists.
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.
Polling interval in seconds.
Name of the server. The name can contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 3 characters and maximum 63 characters.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
Maximum wait in seconds.
Wait until updated with provisioningState at 'Succeeded'.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.
Increase logging verbosity. Use --debug for full debug logs.
الملاحظات
إرسال الملاحظات وعرضها المتعلقة بـ