Connection string for MySQL with multiple connection options?

Regarding this question, I am trying to create a connection string to connect to a MySQL database with the following connection parameters, but I cannot figure it out.

I referenced the documentation referenced by the post, but I cannot resolve even after following the instructions. Can anyone help me in this regard?

Connection parameters that are used:

  • useOldAliasMetadataBehavior=true
  • useUnicode=true
  • characterEncoding=UTF-8

Standard connection string: jdbc:mysql://localhost:3307/databaseName

Adding these connection parameters and their corresponding values, how would the connection string be?

+4
source share
2 answers

:

jdbc:mysql://localhost:3307/databaseName?useOldAliasMetadataBehavior=true&unicode=true&characterEncoding=UTF-8

3306 3307, .

+4

, URL, :

jdbc:MySql://localhost:3307/databaseName?characterEncoding=UTF-8&useUnicode=true&useOldAliasMetadataBehavior=true

XML , & &, :

jdbc:MySql://localhost:3307/databaseName?characterEncoding=UTF-8&useUnicode=true&useOldAliasMetadataBehavior=true
+3

Source: https://habr.com/ru/post/1649124/


All Articles