Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 2.07 KB

File metadata and controls

56 lines (38 loc) · 2.07 KB

Open MySQL server firewall to your IP address

mysql/open-firewall-to-your-ip/README.md

Prerequisites

This example assumes you have previously completed the following examples:

  1. Create an Azure Resource Group
  2. Create an Azure Database for MySQL
  3. Install curl

Open MySQL server firewall to your local IP address

To make it possible to communicate with your MySQL server from your local IP address execute the following command lines:

  export LOCAL_IP=`curl -s whatismyip.akamai.com`

  az mysql server firewall-rule create \
    --resource-group $RESOURCE_GROUP \
    --server $MYSQL_NAME \
    --name AllowMyLocalIP \
    --start-ip-address $LOCAL_IP \
    --end-ip-address $LOCAL_IP

Cleanup

Do NOT forget to remove the resources once you are done running the example.

Next steps

1m