@@ -5,8 +5,8 @@ author: maud-lv
5
5
ms.author : malev
6
6
ms.service : service-connector
7
7
ms.topic : how-to
8
- ms.date : 09/26 /2022
9
- ms.custom : event-tier1-build-2022
8
+ ms.date : 11/29 /2022
9
+ ms.custom : event-tier1-build-2022, engagement-fy23
10
10
---
11
11
12
12
# Integrate Azure Database for MySQL with Service Connector
@@ -25,7 +25,7 @@ Supported authentication and clients for App Service, Container Apps, and Azure
25
25
26
26
| Client type | System-assigned managed identity | User-assigned managed identity | Secret / connection string | Service principal |
27
27
| ---------------------------------| --------------------------------------| --------------------------------| --------------------------------------| -------------------|
28
- | .NET (MySqlConnector) | | | ![ yes icon] ( ./media/green-check.png ) | |
28
+ | .NET (MySqlConnector) | ![ yes icon ] ( ./media/green-check.png ) | | ![ yes icon] ( ./media/green-check.png ) | |
29
29
| Go (go-sql-driver for mysql) | | | ![ yes icon] ( ./media/green-check.png ) | |
30
30
| Java (JDBC) | ![ yes icon] ( ./media/green-check.png ) | | ![ yes icon] ( ./media/green-check.png ) | |
31
31
| Java - Spring Boot (JDBC) | ![ yes icon] ( ./media/green-check.png ) | | ![ yes icon] ( ./media/green-check.png ) | |
@@ -40,41 +40,62 @@ Supported authentication and clients for App Service, Container Apps, and Azure
40
40
41
41
Use the connection details below to connect compute services to Azure Database for MySQL. For each example below, replace the placeholder texts ` <MySQL-DB-name> ` , ` <MySQL-DB-username> ` , ` <MySQL-DB-password> ` , ` <server-host> ` , and ` <port> ` with your Azure Database for MySQL name, Azure Database for MySQL username, Azure Database for MySQL password, server host, and port.
42
42
43
- ### .NET (MySqlConnector) secret / connection string
43
+ ### .NET (MySqlConnector)
44
+
45
+ #### .NET (MySqlConnector) secret / connection string
44
46
45
47
| Default environment variable name | Description | Example value |
46
48
| -----------------------------------| ---------------------------------| ----------------------------------------------------------------------------------------------------------------------------------------------------------------|
47
49
| AZURE_MYSQL_CONNECTIONSTRING | ADO.NET MySQL connection string | ` Server=<MySQL-DB-name>.mysql.database.azure.com;Database=<MySQL-DB-name>;Port=3306;SSL Mode=Required;User Id=<MySQL-DBusername>;Password=<MySQL-DB-password> ` |
48
50
49
- ### Java (JDBC) secret / connection string
51
+ #### .NET (MySqlConnector) system-assigned managed identity
52
+
53
+ | Default environment variable name | Description | Example value |
54
+ | -----------------------------------| ---------------------------------| ----------------------------------------------------------------------------------------------------------------------------------------------------------------|
55
+ | AZURE_MYSQL_CONNECTIONSTRING | ADO.NET MySQL connection string | ` Server=<MySQL-DB-name>.mysql.database.azure.com;Database=<MySQL-DB-name>;Port=3306;SSL Mode=Required;User Id=<MySQL-DBusername>; ` |
56
+
57
+ ### Go (go-sql-driver for mysql)
58
+
59
+ #### Go (go-sql-driver for mysql) secret / connection string
60
+
61
+ | Default environment variable name | Description | Example value |
62
+ | -----------------------------------| ---------------------------------| --------------------------------------------------------------------------------------------------------------|
63
+ | AZURE_MYSQL_CONNECTIONSTRING | Go-sql-driver connection string | ` <MySQL-DB-username>@<MySQL-DB-name>:<MySQL-DB-password>@tcp(<server-host>:<port>)/<MySQL-DB-name>?tls=true ` |
64
+
65
+ ### Java (JDBC)
66
+
67
+ #### Java (JDBC) secret / connection string
50
68
51
69
| Default environment variable name | Description | Example value |
52
70
| -----------------------------------| ------------------------------| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
53
71
| AZURE_MYSQL_CONNECTIONSTRING | JDBC MySQL connection string | ` jdbc:mysql://<MySQL-DB-name>.mysql.database.azure.com:3306/<MySQL-DB-name>?sslmode=required&user=<MySQL-DB-username>&password=<Uri.EscapeDataString(<MySQL-DB-password>) ` |
54
72
55
- ### Java (JDBC) system-assigned managed identity
73
+ #### Java (JDBC) system-assigned managed identity
56
74
57
75
| Default environment variable name | Description | Example value |
58
76
| -----------------------------------| ------------------------------| ------------------------------------------------------------------------------------------------------------------------|
59
77
| AZURE_MYSQL_CONNECTIONSTRING | JDBC MySQL connection string | ` jdbc:mysql://<MySQL-DB-name>.mysql.database.azure.com:3306/<MySQL-DB-name>?sslmode=required&user=<MySQL-DB-username> ` |
60
78
61
- ### Java - Spring Boot (JDBC) secret / connection string
79
+ ### Java - Spring Boot (JDBC)
80
+
81
+ #### Java - Spring Boot (JDBC) secret / connection string
62
82
63
83
| Application properties | Description | Example value |
64
84
| -----------------------------| -------------------------------| -----------------------------------------------------------------------------------------------|
65
85
| spring.datatsource.url | Spring Boot JDBC database URL | ` jdbc:mysql://<MySQL-DB-name>.mysql.database.azure.com:3306/<MySQL-DB-name>?sslmode=required ` |
66
86
| spring.datatsource.username | Database username | ` <MySQL-DB-username>@<MySQL-DB-name> ` |
67
87
| spring.datatsource.password | Database password | ` MySQL-DB-password ` |
68
88
69
- ### Java - Spring Boot (JDBC) system-assigned managed identity
89
+ #### Java - Spring Boot (JDBC) system-assigned managed identity
70
90
71
91
| Application properties | Description | Example value |
72
92
| -----------------------------| -------------------------------| -----------------------------------------------------------------------------------------------|
73
93
| spring.datatsource.url | Spring Boot JDBC database URL | ` jdbc:mysql://<MySQL-DB-name>.mysql.database.azure.com:3306/<MySQL-DB-name>?sslmode=required ` |
74
94
| spring.datatsource.username | Database username | ` Connection-Name ` |
75
- | spring.datatsource.password | Database password | ` MySQL-DB-password ` |
76
95
77
- ### Node.js (mysql) secret / connection string
96
+ ### Node.js (mysql)
97
+
98
+ #### Node.js (mysql) secret / connection string
78
99
79
100
| Default environment variable name | Description | Example value |
80
101
| -----------------------------------| -------------------| --------------------------------------------|
@@ -85,7 +106,22 @@ Use the connection details below to connect compute services to Azure Database f
85
106
| AZURE_MYSQL_PORT | Port number | ` 3306 ` |
86
107
| AZURE_MYSQL_SSL | SSL option | ` true ` |
87
108
88
- ### Python (mysql-connector-python) secret / connection string
109
+ #### PHP (mysqli)
110
+
111
+ #### PHP (mysqli) secret / connection string
112
+
113
+ | Default environment variable name | Description | Example value |
114
+ | -----------------------------------| --------------------| --------------------------------------------|
115
+ | AZURE_MYSQL_HOST | Database Host URL | ` <MySQL-DB-name>.mysql.database.azure.com ` |
116
+ | AZURE_MYSQL_USERNAME | Database Username | ` <MySQL-DB-username>@<MySQL-DB-name> ` |
117
+ | AZURE_MYSQL_PASSWORD | Database password | ` <MySQL-DB-password> ` |
118
+ | AZURE_MYSQL_DBNAME | Database name | ` <MySQL-DB-name> ` |
119
+ | AZURE_MYSQL_PORT | Port number | ` 3306 ` |
120
+ | AZURE_MYSQL_FLAG | SSL or other flags | ` MYSQLI_CLIENT_SSL ` |
121
+
122
+ ### Python (mysql-connector-python)
123
+
124
+ #### Python (mysql-connector-python) secret / connection string
89
125
90
126
| Default environment variable name | Description | Example value |
91
127
| -----------------------------------| -------------------| --------------------------------------------|
@@ -94,7 +130,7 @@ Use the connection details below to connect compute services to Azure Database f
94
130
| AZURE_MYSQL_PASSWORD | Database password | ` MySQL-DB-password ` |
95
131
| AZURE_MYSQL_USER | Database Username | ` <MySQL-DB-username>@<MySQL-DB-name> ` |
96
132
97
- ### Python-Django secret / connection string
133
+ #### Python-Django secret / connection string
98
134
99
135
| Default environment variable name | Description | Example value |
100
136
| -----------------------------------| -------------------| --------------------------------------------|
@@ -103,24 +139,9 @@ Use the connection details below to connect compute services to Azure Database f
103
139
| AZURE_MYSQL_PASSWORD | Database password | ` MySQL-DB-password ` |
104
140
| AZURE_MYSQL_NAME | Database name | ` MySQL-DB-name ` |
105
141
106
- ### Go (go-sql-driver for mysql) secret / connection string
107
-
108
- | Default environment variable name | Description | Example value |
109
- | -----------------------------------| ---------------------------------| --------------------------------------------------------------------------------------------------------------|
110
- | AZURE_MYSQL_CONNECTIONSTRING | Go-sql-driver connection string | ` <MySQL-DB-username>@<MySQL-DB-name>:<MySQL-DB-password>@tcp(<server-host>:<port>)/<MySQL-DB-name>?tls=true ` |
111
-
112
- ### PHP (mysqli) secret / connection string
113
-
114
- | Default environment variable name | Description | Example value |
115
- | -----------------------------------| --------------------| --------------------------------------------|
116
- | AZURE_MYSQL_HOST | Database Host URL | ` <MySQL-DB-name>.mysql.database.azure.com ` |
117
- | AZURE_MYSQL_USERNAME | Database Username | ` <MySQL-DB-username>@<MySQL-DB-name> ` |
118
- | AZURE_MYSQL_PASSWORD | Database password | ` <MySQL-DB-password> ` |
119
- | AZURE_MYSQL_DBNAME | Database name | ` <MySQL-DB-name> ` |
120
- | AZURE_MYSQL_PORT | Port number | ` 3306 ` |
121
- | AZURE_MYSQL_FLAG | SSL or other flags | ` MYSQLI_CLIENT_SSL ` |
142
+ ### Ruby (mysql2)
122
143
123
- ### Ruby (mysql2) secret / connection string
144
+ #### Ruby (mysql2) secret / connection string
124
145
125
146
| Default environment variable name | Description | Example value |
126
147
| -----------------------------------| -------------------| --------------------------------------------|
0 commit comments