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/spring-apps/quickstart-integrate-azure-database-mysql.md
+11-33Lines changed: 11 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,44 +20,27 @@ Pet Clinic, as deployed in the default configuration [Quickstart: Build and depl
20
20
21
21
## Prerequisites
22
22
23
-
*[MySQL CLI is installed](http://dev.mysql.com/downloads/mysql/)
24
-
25
-
## Variables preparation
26
-
27
-
We'll use the following values. Save them in a text file or environment variables to avoid errors. The password should be at least 8 characters long and contain at least one English uppercase letter, one English lowercase letter, one number, and one non-alphanumeric character (!, $, #, %, and so on.).
28
-
29
-
```bash
30
-
export RESOURCE_GROUP=<resource-group-name># customize this
31
-
export MYSQL_SERVER_NAME=<mysql-server-name># customize this
export MYSQL_SERVER_ADMIN_PASSWORD=<password># customize this
36
-
export MYSQL_DATABASE_NAME=petclinic
37
-
```
23
+
An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free).
38
24
39
25
## Prepare an Azure Database for MySQL instance
40
26
41
-
1.If you didn't run the following commands in the previous quickstarts, set the CLI defaults.
27
+
1.Create an Azure Database for MySQL flexible server using the [az mysql flexible-server create](/cli/azure/mysql/flexible-server#az-mysql-flexible-server-create) command. Replace the placeholders `<database-name>`, `<resource-group-name>`, `<MySQL-flexible-server-name>`, `<admin-username>`, and `<admin-password>` with a name for your new database, the name of your resource group, a name for your new server, and an admin username and password.
42
28
43
29
```azcli
44
-
az configure --defaults group=<resourcegroupname> spring-cloud=<service name>
30
+
az mysql flexible-server create --database-name <database-name> --resource-group <resource-group-name> --name <MySQL-flexible-server-name> --admin-user <admin-username> --admin-password <admin-password>
45
31
```
46
32
47
-
1. Create an Azure Database for MySQL flexible servers [az mysql flexible-server create](/cli/azure/mysql/flexible-server#az-mysql-flexible-server-create) command below. Replace the placeholders `<database-name>`, `<resource-group-name>`, `<MySQL-flexible-server-name>`, `<admin-username>`, and `<admin-password>` with a name for your new database, the name of your resource group, a name for your new server, and an admin username and password.
33
+
> [!NOTE]
34
+
> Standard_B1ms SKU is used by default. Refer to [Azure Database for MySQL pricing](https://azure.microsoft.com/pricing/details/mysql/flexible-server/) for pricing details.
48
35
49
-
```azcli
50
-
az mysql flexible-server create --database-name <database-name> --resource-group <resource-group-name> --name <MySQL-flexible-server-name> --admin-user <admin-username> --admin-password <admin-password>
51
-
```
52
-
53
-
> [!NOTE]
54
-
> Standard_B1ms SKU is used by default. Refer to [Azure Database for MySQL pricing](https://azure.microsoft.com/pricing/details/mysql/flexible-server/) for pricing details.
36
+
> [!TIP]
37
+
> Password should be at least eight characters long and contain at least one English uppercase letter, one English lowercase letter, one number, and one non-alphanumeric character (!, $, #, %, and so on.).
55
38
56
39
1. A CLI prompt asks if you want to enable access to your IP. Enter `Y` to confirm.
57
40
58
41
## Connect your application to the MySQL database
59
42
60
-
Use [Service Connector](/service-connector/overview) to connect the app hosted in Azure Spring Apps to your MySQL database.
43
+
Use [Service Connector](../service-connector/overview.md) to connect the app hosted in Azure Spring Apps to your MySQL database.
61
44
62
45
### [Azure CLI](#tab/azure-cli)
63
46
@@ -106,7 +89,7 @@ Use [Service Connector](/service-connector/overview) to connect the app hosted i
106
89
| **MySQL database** | *petclinic* | Select the database you created earlier. |
107
90
| **Client type** | *.NET* | Select the application stack that works with the target service you selected. |
108
91
109
-
:::image type="content" source="./media\quickstart-integrate-azure-database-mysql\basics-tab.png" alt-text="Screenshot of the Azure portal, filling out the basics tab in Service Connector.":::
92
+
:::image type="content" source="./media\quickstart-integrate-azure-database-mysql\basics-tab.png" alt-text="Screenshot of the Azure portal, filling out the basics tab in Service Connector.":::
110
93
111
94
1. Select **Next: Authentication** to select the authentication type. Then select **Connection string > Database credentials** and enter your database username and password.
112
95
@@ -136,8 +119,6 @@ The target service firewall is validated success
136
119
The configured values (except username/password) is validated success
137
120
```
138
121
139
-
Provisioning state *Succeeded* means that the connection is valid.
140
-
141
122
> [!TIP]
142
123
> To get more details about the connection between your services, remove `--output table`from the above command.
143
124
@@ -151,13 +132,10 @@ Azure Spring Apps connections are displayed under **Settings > Service Connector
151
132
152
133
## Clean up resources
153
134
154
-
If you plan to continue working with subsequent quickstarts and tutorials, you might want to leave these resources in place. When no longer needed, delete the resource group, which deletes the resources in the resource group. To delete the resourcegroup by using Azure CLI, use the following commands:
135
+
If you plan to continue working with subsequent quickstarts and tutorials, you might want to leave these resources in place. When no longer needed, delete the resource group by using the [az group delete](/cli/azure/group#az-group-delete) command, which deletes the resources in the resource group. Replace `<resource-group>` with the name of your resource group.
0 commit comments