Connect with MariaDB Connector/R2DBC
This page is part of MariaDB's Documentation.
The parent of this page is: MariaDB Connector/R2DBC
Topics on this page:
Overview
Java developers can use MariaDB Connector/R2DBC to establish client connections with MariaDB database products.
Connection Parameters
MariaDB Connector/R2DBC supports several connection parameters:
Parameter Name | Description | Type | Default Value |
---|---|---|---|
| Allows you to execute several SQL statements in a single call. The statements should be separated by the ; delimiter. For example, the following string would execute two INSERT statements: |
|
|
| Allows queries to be executed in a pipeline, so that the next query is sent to the server before the previous query has finished execution. |
|
|
| Allows the RSA public key to be retrieved from the server, rather than from the |
|
|
| Sets default autocommit |
|
|
| Configures the RSA public key. The RSA public key only applies when connecting to MySQL with the |
| |
| Configures the TLS client certificate. The TLS client certificate is only required when TLS client authentication is required. The parameter can be specified in 3 different formats:
|
| |
| Configures the TLS client private key. The TLS client private key is only required when TLS client authentication is required. |
| |
| Configures the password for the TLS client private key. This is only required when the |
| |
| Sets client attributes that are sent to the server. When |
| |
| Sets the connection timeout. |
|
|
| Default database to use when establishing the connection. |
| |
| IP address or DNS of the database server. Multiple hosts can be set by using comma separated list. If the first host is not reachable (timeout is |
| |
| Allows setting the default isolation level on connection creation. Possible values are: r2dbc:mariadb://USER@PASSWORD@HOST:PORT/DATABASE?isolationLevel=REPEATABLE-READ
|
|
|
| Permits sharing |
| |
| Configures the secondary password. The secondary password is only required when the |
| |
| User password. |
| |
| Permit server redirection |
|
|
| Database server port number. Not used when using option |
| 3306 |
| If |
|
|
| Can restrict authentication to the specified list of authentication plugins. The authentication plugins should be separated by commas. When set to an empty string, any authentication plugin can be used. By default, the following authentication plugins can be specified: | string | |
| Configures the RSA public key. The RSA public key only applies when connecting to MySQL with the |
| |
| Configures the TLS server certificate or the server's TLS CA certificate. This parameter enables a self-signed certificate to be trusted. The parameter can be specified in 3 different formats:
|
| |
| Sets session values of system variables upon successful connection. The value should be set to a mapping of variables to values. For example, | Map<String,String> | |
| Configures the path to the Unix domain socket. Connecting to a Unix domain socket can be faster than connecting via TCP/IP. Connecting to a Unix domain socket also allows authentication to occur using the |
| |
| Used with sslMode=TUNNEL, enables use of a customized SSL Context Builder. By default, SSL tunnel mode does not validate tunnel certificates and hostnames. This option permits the use of certificates, and setting the required protocol and ciphers to create a tunnel socket. |
| |
| Sets the TLS mode. Possible values are:
|
|
|
| When the |
|
|
| This option can be used in environments where connections are created and closed in rapid succession. Often, it is not possible to create a socket in such an environment after a while, since all local "ephemeral" ports are used up by TCP connections in |
|
|
| Sets socket to keep alive. |
|
|
| This option permits forcing a session timezone in case of a client having a different timezone compared to the server. Possible values are:
Since 1.2.0 |
|
|
| Configures how the connector handles |
|
|
| Configures the supported set of TLS protocol versions. The value can be set to a comma-separated list of TLS protocol versions. For example: |
|
|
| Saves commands in transactions. If a failover occurs during a transaction, the connector can automatically reconnect and replay transactions, making failover completely transparent. The driver will buffer up commands in a transaction until an inner limit is reached. A huge command may temporarily disable transaction buffering for current transactions. Commands must be idempotent only (queries can be "re-playable"). |
|
|
| User of access database. |
| |
| Configures whether queries with parameters are evaluated using server-side prepared statements or client-side prepared statements. When server-side prepared statements are used, queries are transmitted using the binary protocol by default, but the text protocol can be used by prefixing the query string with |
|
|