> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/release-notes/connectors/java/2.5/2.5.0.md).

# Connector/J 2.5.0 Release Notes

Release notes for MariaDB Connector/J 2.5.0, a Release Candidate (RC) release published 3 October 2019.

{% hint style="info" %}

<p align="center">The most recent release of <a href="/docs/connectors/mariadb-connector-j.md">MariaDB Connector/J</a> is: <a href="/docs/release-notes/connectors/java/3.5/3.5.10.md"><strong>3.5.10</strong></a></p>

<p align="center"><a href="https://mariadb.com/downloads/connectors/connectors-data-access/java8-connector" class="button primary">Download Connector/J 3.5.10</a></p>
{% endhint %}

[Download](https://mariadb.com/downloads/connectors/connectors-data-access/java8-connector) | **Release Notes** | [Changelog](/docs/release-notes/connectors/java/changelogs/2.5/2.5.0.md) | [About MariaDB Connector/J](/docs/connectors/mariadb-connector-j/about-mariadb-connector-j.md)

**Release date:** 3 Oct 2019

MariaDB Connector/J 2.5.0 is a [***Release Candidate (RC)***](/docs/release-notes/community-server/about/release-criteria.md) release.

{% hint style="warning" %}
**NOTE:** MariaDB Connector/J 2.5.0 is fully compatible with the latest release of version 2.4. Further maintenance releases will not be provided for version 2.4.
{% endhint %}

{% hint style="info" %}
**For an overview of MariaDB Connector/J see the** [**About MariaDB Connector/J**](/docs/connectors/mariadb-connector-j/about-mariadb-connector-j.md) **page**
{% endhint %}

## Evolutions

### Authentication service

[Client authentication plugins](/docs/server/reference/plugins/authentication-plugins.md) are now defined as services. This permits to easily add new client authentication plugins.\
The driver has 2 new plugins `caching_sha2_password` and `sha256_password plugin` for MySQL compatibility

List of authentication plugins in java connector :

* mysql\_clear\_password
* auth\_gssapi\_client
* client\_ed25519
* mysql\_native\_password
* mysql\_old\_password
* dialog (PAM)
* sha256\_password
* caching\_sha2\_password

New authentication plugins can be created implementing interface org.mariadb.jdbc.authentication.AuthenticationPlugin, and listing new plugin in a META-INF/services/org.mariadb.jdbc.authentication.AuthenticationPlugin file.

### Credential service

Credentials are usually set using user/password in the connection string or by using DriverManager.getConnection(String url, String user, String password).

Credential plugins permit to provide credential information from other means. Those plugins have to be activated setting option `credentialType` to designated plugin.

The driver has 3 default plugins :

#### AWS IAM

This permits AWS database IAM authentication. The plugin generate a token using IAM credential and region. Token is valid for 15 minutes and cached for 10 minutes.

To use this credential authentication, com.amazonaws:aws-java-sdk-rds dependency must be registered in classpath.\
Implementation use SDK DefaultAWSCredentialsProviderChain and DefaultAwsRegionProviderChain to get IAM credential and region.\
see [DefaultAWSCredentialsProviderChain](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/auth/DefaultAWSCredentialsProviderChain.html) and [DefaultAwsRegionProviderChain](https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/auth/DefaultAWSCredentialsProviderChain.html) to check how those information can be retrieved (environment variable / system properties, files, ...)

Example: `jdbc:mariadb://host/db?credentialType=AWS-IAM&useSsl&serverSslCert=/somepath/rds-combined-ca-bundle.pem`

with AWS\_ACCESS\_KEY\_ID, AWS\_SECRET\_ACCESS\_KEY and AWS\_REGION environment variable set.

#### Environment

User and Password are retrieved from environment variables. default environment variables are MARIADB\_USER and MARIADB\_PWD, but can be changed by setting additional option `userKey` and `pwdKey`

Example : using connection string `jdbc:mariadb://host/db?credentialType=ENV` user and password will be retrieved from environment variable MARIADB\_USER and MARIADB\_PWD.

#### Property

User and Password are retrieved from java properties. default property name are mariadb.user and mariadb.pwd, but property names can be changed by setting additional option `userKey` and `pwdKey`

Example : using connection string `jdbc:mariadb://host/db?credentialType=PROPERTY&userKey=mariadbUser&pwdKey=mariadbPwd` user and password will be retrieved from java properties `mariadbUser` and `mariadbPwd`

### SSL factory service

A connection to a server initially creates a socket. When set, SSL socket is layered over this existing socket.\
Implementing org.mariadb.jdbc.tls.TlsSocketPlugin permit to provide custom SSL implementation for example create a new [HostnameVerifier](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/javax/net/ssl/HostnameVerifier.html) implementation.

Custom implementation need to implement org.mariadb.jdbc.tls.TlsSocketPlugin and register service META-INF/services/org.mariadb.jdbc.tls.TlsSocketPlugin

Custom implementation are activated using option `tlsSocketType`

## Other

* [CONJ-561](https://jira.mariadb.org/browse/CONJ-561) : JDBC 4.3 partial implementation java.sql.Statement methods isSimpleIdentifier, enquoteIdentifier, enquoteLiteral and enquoteNCharLiteral
* [CONJ-692](https://jira.mariadb.org/browse/CONJ-692) : ConnectionPoolDataSource interface addition to MariaDbPoolDataSource
* [CONJ-563](https://jira.mariadb.org/browse/CONJ-563) : closing possible option batch thread on driver deregistration.

## Bug fixes

* [CONJ-732](https://jira.mariadb.org/browse/CONJ-732) : Driver getPropertyInfo returns no options information when url is empty
* [CONJ-734](https://jira.mariadb.org/browse/CONJ-734) : DatabaseMetaData.getSchemaTerm now return "schema", not empty string

## New options

| credentialType          | tlsSocketType                                                                                                  | serverRsaPublicKeyFile | allowPublicKeyRetrieval |
| ----------------------- | -------------------------------------------------------------------------------------------------------------- | ---------------------- | ----------------------- |
| credentialType          | Indicate the credential plugin type to use. Plugin must be present in classpath                                |                        |                         |
| tlsSocketType           | Indicate TLS socket type implementation                                                                        |                        |                         |
| serverRsaPublicKeyFile  | Indicate path to MySQL server public RSA key file                                                              |                        |                         |
| allowPublicKeyRetrieval | Authorize client to ask MySQL server public RSA key file if not set using serverRsaPublicKeyFileDefault: false |                        |                         |

## Changelog

For a complete list of changes made in MariaDB Connector/J 2.5.0, with links to detailed information on each push, see the [changelog](/docs/release-notes/connectors/java/changelogs/2.5/2.5.0.md).

<sub>*This page is: Copyright © 2026 MariaDB. All rights reserved.*</sub>

{% @marketo/form formid="4316" formId="4316" %}
