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
> If you are using MysqlConnectionPoolDataSource class as the datasource in your application, please remove "defaultAuthenticationPlugin=com.azure.identity.providers.mysql.AzureIdentityMysqlAuthenticationPlugin" in the url.
@@ -464,12 +464,12 @@ public class DemoApplication {
464
464
465
465
[Having any issues? Let us know.](https://github.com/MicrosoftDocs/azure-docs/issues)
466
466
467
-
This Java code will use the *application.properties* and the *schema.sql* files that you created earlier, in order to connect to the MySQL server and create a schema that will store your data.
467
+
This Java code will use the *database.properties* and the *schema.sql* files that you created earlier, in order to connect to the MySQL server and create a schema that will store your data.
468
468
469
469
In this file, you can see that we commented methods to insert, read, update and delete data: you'll code those methods in the rest of this article, and you'll be able to uncomment them one after each other.
470
470
471
471
> [!NOTE]
472
-
> The database credentials are stored in the *user* and *password* properties of the *application.properties* file. Those credentials are used when executing `DriverManager.getConnection(properties.getProperty("url"), properties);`, as the properties file is passed as an argument.
472
+
> The database credentials are stored in the *user* and *password* properties of the *database.properties* file. Those credentials are used when executing `DriverManager.getConnection(properties.getProperty("url"), properties);`, as the properties file is passed as an argument.
473
473
474
474
> [!NOTE]
475
475
> The `AbandonedConnectionCleanupThread.uncheckedShutdown();` line at the end is a MySQL driver specific command to destroy an internal thread when shutting down the application.
Copy file name to clipboardExpand all lines: articles/mysql/single-server/connect-java.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,7 @@ Replace the placeholders with the following values, which are used throughout th
56
56
57
57
-`<YOUR_DATABASE_SERVER_NAME>`: The name of your MySQL server, which should be unique across Azure.
58
58
-`<YOUR_AZURE_REGION>`: The Azure region you'll use. You can use `eastus` by default, but we recommend that you configure a region closer to where you live. You can see the full list of available regions by entering `az account list-locations`.
59
-
-`<YOUR_LOCAL_IP_ADDRESS>`: The IP address of your local computer, from which you'll run your Spring Boot application. One convenient way to find it is to open [whatismyip.akamai.com](http://whatismyip.akamai.com/).
59
+
-`<YOUR_LOCAL_IP_ADDRESS>`: The IP address of your local computer, from which you'll run your application. One convenient way to find it is to open [whatismyip.akamai.com](http://whatismyip.akamai.com/).
60
60
61
61
### [Password](#tab/password)
62
62
@@ -345,14 +345,14 @@ This file is an [Apache Maven](https://maven.apache.org/) file that configures y
345
345
346
346
### Prepare a configuration file to connect to Azure Database for MySQL
347
347
348
-
Run the following script in the project root directory to create a *src/main/resources/application.properties* file and add configuration details:
348
+
Run the following script in the project root directory to create a *src/main/resources/database.properties* file and add configuration details:
> If you are using MysqlConnectionPoolDataSource class as the datasource in your application, please remove "defaultAuthenticationPlugin=com.azure.identity.providers.mysql.AzureIdentityMysqlAuthenticationPlugin" in the url.
@@ -458,12 +458,12 @@ public class DemoApplication {
458
458
}
459
459
```
460
460
461
-
This Java code will use the *application.properties* and the *schema.sql* files that you created earlier. After connecting to the MySQL server, you can create a schema to store your data.
461
+
This Java code will use the *database.properties* and the *schema.sql* files that you created earlier. After connecting to the MySQL server, you can create a schema to store your data.
462
462
463
463
In this file, you can see that we commented methods to insert, read, update and delete data. You'll implement those methods in the rest of this article, and you'll be able to uncomment them one after each other.
464
464
465
465
> [!NOTE]
466
-
> The database credentials are stored in the *user* and *password* properties of the *application.properties* file. Those credentials are used when executing `DriverManager.getConnection(properties.getProperty("url"), properties);`, as the properties file is passed as an argument.
466
+
> The database credentials are stored in the *user* and *password* properties of the *database.properties* file. Those credentials are used when executing `DriverManager.getConnection(properties.getProperty("url"), properties);`, as the properties file is passed as an argument.
467
467
468
468
> [!NOTE]
469
469
> The `AbandonedConnectionCleanupThread.uncheckedShutdown();` line at the end is a MySQL driver command to destroy an internal thread when shutting down the application. You can safely ignore this line.
0 commit comments