You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/mysql/quickstart-create-mysql-server-database-using-arm-template.md
+73-73Lines changed: 73 additions & 73 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,52 +56,6 @@ More Azure Database for MySQL template samples can be found in the [quickstart t
56
56
57
57
## Deploy the template
58
58
59
-
# [CLI](#tab/CLI)
60
-
61
-
Use the following interactive code to create a new Azure Database for MySQL server using the template. The code prompts you for the new server name, the name and location of a new resource group, and an administrator account name and password.
62
-
63
-
To run the code in Azure Cloud Shell, select **Try it** at the upper corner of any code block.
64
-
65
-
```azurecli-interactive
66
-
echo "Enter a name for the new Azure Database for MySQL server:" &&
67
-
read serverName &&
68
-
echo "Enter a name for the new resource group where the server will exist:" &&
69
-
read resourceGroupName &&
70
-
echo "Enter an Azure region (for example, centralus) for the resource group:" &&
71
-
read location &&
72
-
echo "Enter the Azure Database for MySQL server's administrator account name:" &&
az group create --name $resourceGroupName --location $location &&
78
-
az deployment group create --resource-group $resourceGroupName --parameters $params --template-uri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-managed-mysql-with-vnet/azuredeploy.json &&
79
-
echo "Press [ENTER] to continue ..."
80
-
```
81
-
82
-
# [PowerShell](#tab/PowerShell)
83
-
84
-
Use the following interactive code to create a new Azure Database for MySQL server using the template. The code prompts you for the new server name, the name and location of a new resource group, and an administrator account name and password.
85
-
86
-
To run the code in Azure Cloud Shell, select **Try it** at the upper corner of any code block.
87
-
88
-
```azurepowershell-interactive
89
-
$serverName = Read-Host -Prompt "Enter a name for the new Azure Database for MySQL server"
90
-
$resourceGroupName = Read-Host -Prompt "Enter a name for the new resource group where the server will exist"
91
-
$location = Read-Host -Prompt "Enter an Azure region (for example, centralus) for the resource group"
92
-
$adminUser = Read-Host -Prompt "Enter the Azure Database for MySQL server's administrator account name"
93
-
$adminPassword = Read-Host -Prompt "Enter the administrator password" -AsSecureString
94
-
95
-
New-AzResourceGroup -Name $resourceGroupName -Location $location # Use this command when you need to create a new resource group for your deployment
Select the following link to deploy the Azure Database for MySQL server template in the Azure portal:
@@ -139,22 +93,64 @@ On the **Deploy Azure Database for MySQL with VNet** page:
139
93
140
94
6. Select **Purchase**.
141
95
142
-
---
96
+
# [PowerShell](#tab/PowerShell)
143
97
144
-
## Review deployed resources
98
+
Use the following interactive code to create a new Azure Database for MySQL server using the template. The code prompts you for the new server name, the name and location of a new resource group, and an administrator account name and password.
99
+
100
+
To run the code in Azure Cloud Shell, select **Try it** at the upper corner of any code block.
101
+
102
+
```azurepowershell-interactive
103
+
$serverName = Read-Host -Prompt "Enter a name for the new Azure Database for MySQL server"
104
+
$resourceGroupName = Read-Host -Prompt "Enter a name for the new resource group where the server will exist"
105
+
$location = Read-Host -Prompt "Enter an Azure region (for example, centralus) for the resource group"
106
+
$adminUser = Read-Host -Prompt "Enter the Azure Database for MySQL server's administrator account name"
107
+
$adminPassword = Read-Host -Prompt "Enter the administrator password" -AsSecureString
108
+
109
+
New-AzResourceGroup -Name $resourceGroupName -Location $location # Use this command when you need to create a new resource group for your deployment
Run the following interactive code to view details about your Azure Database for MySQL server. You'll have to enter the name and the resource group of the new server.
121
+
Use the following interactive code to create a new Azure Database for MySQL server using the template. The code prompts you for the new server name, the name and location of a new resource group, and an administrator account name and password.
122
+
123
+
To run the code in Azure Cloud Shell, select **Try it** at the upper corner of any code block.
149
124
150
125
```azurecli-interactive
151
-
echo "Enter your Azure Database for MySQL server name:" &&
126
+
echo "Enter a name for the new Azure Database for MySQL server:" &&
152
127
read serverName &&
153
-
echo "Enter the resource group where the Azure Database for MySQL server exists:" &&
154
-
read resourcegroupName &&
155
-
az resource show --resource-group $resourcegroupName --name $serverName --resource-type "Microsoft.DbForMySQL/servers"
128
+
echo "Enter a name for the new resource group where the server will exist:" &&
129
+
read resourceGroupName &&
130
+
echo "Enter an Azure region (for example, centralus) for the resource group:" &&
131
+
read location &&
132
+
echo "Enter the Azure Database for MySQL server's administrator account name:" &&
Follow these steps to see an overview of your new Azure Database for MySQL server:
164
+
# [CLI](#tab/CLI)
171
165
172
-
1. In the [Azure portal](https://portal.azure.com), search for and select **Azure Database for MySQL servers**.
166
+
Run the following interactive code to view details about your Azure Database for MySQL server. You'll have to enter the name and the resource group of the new server.
173
167
174
-
2. In the database list, select your new server. The **Overview** page for your new Azure Database for MySQL server appears.
168
+
```azurecli-interactive
169
+
echo "Enter your Azure Database for MySQL server name:" &&
170
+
read serverName &&
171
+
echo "Enter the resource group where the Azure Database for MySQL server exists:" &&
172
+
read resourcegroupName &&
173
+
az resource show --resource-group $resourcegroupName --name $serverName --resource-type "Microsoft.DbForMySQL/servers"
174
+
```
175
175
176
176
---
177
177
178
178
## Clean up resources
179
179
180
180
When it's no longer needed, delete the resource group, which deletes the resources in the resource group.
181
181
182
-
# [CLI](#tab/CLI)
182
+
# [Portal](#tab/azure-portal)
183
183
184
-
```azurecli-interactive
185
-
echo "Enter the Resource Group name:" &&
186
-
read resourceGroupName &&
187
-
az group delete --name $resourceGroupName &&
188
-
echo "Press [ENTER] to continue ..."
189
-
```
184
+
1. In the [Azure portal](https://portal.azure.com), search for and select **Resource groups**.
185
+
186
+
2. In the resource group list, choose the name of your resource group.
187
+
188
+
3. In the **Overview** page of your resource group, select **Delete resource group**.
189
+
190
+
4. In the confirmation dialog box, type the name of your resource group, and then select **Delete**.
0 commit comments