az mysql server firewall-rule

Manage firewall rules for a server.

Commands

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 firewall-rule create

Create a new firewall rule for a server.

az mysql server firewall-rule create --end-ip-address
--name
--resource-group
--server-name
--start-ip-address

Examples

Create a firewall rule allowing all connections from all IP addresses.

az mysql server firewall-rule create -g testgroup -s testsvr -n allowall --start-ip-address 0.0.0.0 --end-ip-address 255.255.255.255

Required Parameters

--end-ip-address
The end IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' to represent all Azure-internal IP addresses.
--name -n
The name of the firewall rule.
--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.
--start-ip-address
The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' to represent all Azure-internal IP addresses.

az mysql server firewall-rule delete

Delete a firewall rule.

az mysql server firewall-rule delete --name
--resource-group
--server-name
[--yes]

Required Parameters

--name -n
The name of the firewall rule.
--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

--yes -y
Do not prompt for confirmation.

az mysql server firewall-rule list

List all firewall rules for a server.

az mysql server firewall-rule list --resource-group
--server-name

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.

az mysql server firewall-rule show

Get the details of a firewall rule.

az mysql server firewall-rule show --name
--resource-group
--server-name

Required Parameters

--name -n
The name of the firewall rule.
--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.

az mysql server firewall-rule update

Update a firewall rule.

az mysql server firewall-rule update --name
--resource-group
--server-name
[--add]
[--end-ip-address]
[--remove]
[--set]
[--start-ip-address]

Examples

Update a firewall rule's start IP address.

az mysql server firewall-rule update -g testgroup -s testsvr -n allowall --start-ip-address 0.0.0.1

Update a firewall rule's start and end IP address.

az mysql server firewall-rule update -g testgroup -s testsvr -n allowall --start-ip-address 0.0.0.1 --end-ip-address 255.255.255.254

Required Parameters

--name -n
The name of the firewall rule.
--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

--add
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty .
--end-ip-address
The end IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' to represent all Azure-internal IP addresses.
--remove
Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.
--set
Update an object by specifying a property path and value to set. Example: --set property1.property2=.
--start-ip-address
The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' to represent all Azure-internal IP addresses.