Skip to content

Commit 3df0964

Browse files
Rearranged the other tabbed conceptuals to Portal-PowerShell-CLI order.
1 parent 259e706 commit 3df0964

File tree

1 file changed

+73
-73
lines changed

1 file changed

+73
-73
lines changed

articles/mysql/quickstart-create-mysql-server-database-using-arm-template.md

Lines changed: 73 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -56,52 +56,6 @@ More Azure Database for MySQL template samples can be found in the [quickstart t
5656

5757
## Deploy the template
5858

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:" &&
73-
read adminUser &&
74-
echo "Enter the administrator password:" &&
75-
read adminPassword &&
76-
params='serverName='$serverName' administratorLogin='$adminUser' administratorLoginPassword='$adminPassword &&
77-
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
96-
New-AzResourceGroupDeployment -ResourceGroupName $resourceGroupName `
97-
-TemplateUri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-managed-mysql-with-vnet/azuredeploy.json `
98-
-serverName $serverName `
99-
-administratorLogin $adminUser `
100-
-administratorLoginPassword $adminPassword
101-
102-
Read-Host -Prompt "Press [ENTER] to continue ..."
103-
```
104-
10559
# [Portal](#tab/azure-portal)
10660

10761
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:
13993

14094
6. Select **Purchase**.
14195

142-
---
96+
# [PowerShell](#tab/PowerShell)
14397

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
110+
New-AzResourceGroupDeployment -ResourceGroupName $resourceGroupName `
111+
-TemplateUri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-managed-mysql-with-vnet/azuredeploy.json `
112+
-serverName $serverName `
113+
-administratorLogin $adminUser `
114+
-administratorLoginPassword $adminPassword
115+
116+
Read-Host -Prompt "Press [ENTER] to continue ..."
117+
```
145118

146119
# [CLI](#tab/CLI)
147120

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

150125
```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:" &&
152127
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:" &&
133+
read adminUser &&
134+
echo "Enter the administrator password:" &&
135+
read adminPassword &&
136+
params='serverName='$serverName' administratorLogin='$adminUser' administratorLoginPassword='$adminPassword &&
137+
az group create --name $resourceGroupName --location $location &&
138+
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 &&
139+
echo "Press [ENTER] to continue ..."
156140
```
157141

142+
---
143+
144+
## Review deployed resources
145+
146+
# [Portal](#tab/azure-portal)
147+
148+
Follow these steps to see an overview of your new Azure Database for MySQL server:
149+
150+
1. In the [Azure portal](https://portal.azure.com), search for and select **Azure Database for MySQL servers**.
151+
152+
2. In the database list, select your new server. The **Overview** page for your new Azure Database for MySQL server appears.
153+
158154
# [PowerShell](#tab/PowerShell)
159155

160156
Run the following interactive code to view details about your Azure Database for MySQL server. You'll have to enter the name of the new server.
@@ -165,28 +161,33 @@ Get-AzResource -ResourceType "Microsoft.DBforMySQL/servers" -Name $serverName |
165161
Write-Host "Press [ENTER] to continue..."
166162
```
167163

168-
# [Portal](#tab/azure-portal)
169-
170-
Follow these steps to see an overview of your new Azure Database for MySQL server:
164+
# [CLI](#tab/CLI)
171165

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

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+
```
175175

176176
---
177177

178178
## Clean up resources
179179

180180
When it's no longer needed, delete the resource group, which deletes the resources in the resource group.
181181

182-
# [CLI](#tab/CLI)
182+
# [Portal](#tab/azure-portal)
183183

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

191192
# [PowerShell](#tab/PowerShell)
192193

@@ -196,15 +197,14 @@ Remove-AzResourceGroup -Name $resourceGroupName
196197
Write-Host "Press [ENTER] to continue..."
197198
```
198199

199-
# [Portal](#tab/azure-portal)
200-
201-
1. In the [Azure portal](https://portal.azure.com), search for and select **Resource groups**.
202-
203-
2. In the resource group list, choose the name of your resource group.
204-
205-
3. In the **Overview** page of your resource group, select **Delete resource group**.
200+
# [CLI](#tab/CLI)
206201

207-
4. In the confirmation dialog box, type the name of your resource group, and then select **Delete**.
202+
```azurecli-interactive
203+
echo "Enter the Resource Group name:" &&
204+
read resourceGroupName &&
205+
az group delete --name $resourceGroupName &&
206+
echo "Press [ENTER] to continue ..."
207+
```
208208

209209
---
210210

0 commit comments

Comments
 (0)