MySQL Connector/J



Dear MySQL users,

MySQL Connector/J 8.0.23 is the latest General Availability release of
the MySQL Connector/J 8.0 series. It is suitable for use with MySQL
Server versions 8.0, 5.7, and 5.6. It supports the Java Database
Connectivity (JDBC) 4.2 API, and implements the X DevAPI.

This release includes the following new features and changes, also
described in more detail on

As always, we recommend that you check the “CHANGES” file in the
download archive to be aware of changes in behavior that might affect
your application.

MySQL Connector/J

To download MySQL Connector/J 8.0.23 GA, see the “General Availability
(GA) Releases” tab at http://dev.mysql.com/downloads/connector/j/

Enjoy!

Changes in MySQL Connector/J 8.0.23 (2021-01-18, General Availability)

Deprecation and Removal Notes

For example, install the.jar file at C: Program Files MySQL MySQL Connector J mysql-connector-java-5.1.32-bin.jar. Parent topic: Creating and importing reports into Unified Manager Next topic: Create a database user with the Report Schema role. 4.1 Installing Connector/J from a Binary Distribution 4.2 Installing Connector/J Using Maven 4.3 Installing from Source 4.4 Upgrading from an Older Version 4.4.1 Upgrading to MySQL Connector/J 8.0 4.5 Testing Connector/J. MySQL Connector J is a Shareware software in the category Miscellaneous developed by Oracle Corporation. It was checked for updates 754 times by the users of our client application UpdateStar during the last month.

* As an implementation of the MySQL Terminology Updates (https://mysqlhighavailability.com/mysql-terminology-updates/),
connection properties and public method names have
been adjusted in the following manners:

Configuration properties define how Connector/J will make a connection to a MySQL server. Unless otherwise noted, properties can be set for a DataSource object or for a Connection object. Configuration properties can be set in one of the following ways. MySQL Connector/J is the official JDBC driver for MySQL. MySQL Connector/J 8.0 is compatible with all MySQL versions starting with MySQL 5.6. Additionally, MySQL Connector/J 8.0 supports the new X DevAPI for development with MySQL Server 8.0. MySQL Connector/J 8.0 is highly recommended for use with MySQL Server 8.0, 5.7 and 5.6.

MySQL Connector/J
  • Changing “master” to “source”: For example, the
    connection property queriesBeforeRetryMaster becomes
    queriesBeforeRetrySource, and the method
    isMasterConnection() becomes isSourceConnection()

  • Changing “slave” to “replica”: For example, the
    connection property allowSlavesDownConnections
    becomes allowReplicaDownConnections, and the method
    getSlaveHosts() becomes getReplicaHosts()

  • Changing “blacklist” to “blocklist”: For example,
    the connection property loadBalanceBlacklistTimeout
    becomes loadBalanceBlocklistTimeout.

Old names have been deprecated—though they are still
usable for now, they are to be removed eventually in
future releases; users are therefore encouraged to switch
to the new names.
See the MySQL Connector/J 8.0 Developer Guide
(https://dev.mysql.com/doc/connector-j/8.0/en/), the
Connector/J API documentation (generated by Javadoc), and
the MySQL Connector/J X DevAPI Reference for information
on any new property and method names.

Functionality Added or Changed

* While a java.sql.TIME instance, according to the JDBC
specification, is not supposed to contain fractional
seconds by design, because java.sql.TIME is a wrapper
around java.util.Date, it is possible to store fractional
seconds in a java.sql.TIME instance. However, when
Connector/J inserted a java.sql.TIME into the server as a
MySQL TIME value, the fractional seconds were always
truncated. To allow the fractional seconds to be sent to
the server, a new connection property,
sendFractionalSecondsForTime, has been introduced: when
the property is true (which is the default value), the
fractional seconds for java.sql.TIME are sent to the
server; otherwise, the fractional seconds are truncated.
Also, the connection property sendFractionalSeconds has
been changed into a global control for the sending of
fractional seconds for ALL date-time types. As a result,
if sendFractionalSeconds=false, fractional seconds are
not sent irrespective of the value of
sendFractionalSecondsForTime.
(Bug #20959249, Bug #76775)

* Connector/J now supports the following authentication
methods for LDAP Pluggable Authentication
(https://dev.mysql.com/doc/refman/8.0/en/ldap-pluggable-authentication.html)
with the MySQL Enterprise Server:

  • The GSSAPI/Kerberos Authentication Method:
    (https://dev.mysql.com/doc/refman/8.0/en/ldap-pluggable-authentication.html#ldap-pluggable-authentication-gssapi)
    A new connection property,
    ldapServerHostname, has been introduced for
    specifying the LDAP service host principal as
    configured in the Kerberos key distribution centre
    (KDC). See the description for ldapServerHostname in
    the MySQL Connector/J 8.0 Developer Guide
    (https://dev.mysql.com/doc/connector-j/8.0/en/) for details.

  • The SCRAM-SHA-256 method.

Bugs Fixed

* Storing a java.time.LocalDateTime object onto the server
as a TIMESTAMP value using a batched PreparedStatement
failed with the complaint that java.time.LocalDateTime
could not be cast to java.sql.Timestamp. With this fix,
the casting works again.
(Bug #32099505, Bug #101413)

* Using the setObject() method to set a
ByteArrayInputStream instance for a PreparedStatement
resulted in a SQLException. (Bug #32046007, Bug #101242)

* The returned value for a TIMESTAMP was incorrect when a
temporal interval expression
(https://dev.mysql.com/doc/refman/8.0/en/expressions.html#temporal-intervals)
was used in the SQL statement for
the query. (Bug #31074051, Bug #99013)

* After upgrading from Connector/J 5.1 to 8.0, the results
of saving and then retrieving DATETIME and TIMESTAMP
values became different sometimes. It was because while
Connector/J 5.1 does not preserve a time instant by
default, Connector/J 8.0.22 and earlier tried to so by
converting a timestamp to the server’s session time zone
before sending its value to the server. In this release,
new mechanisms for controlling timezone conversion has
been introduced—see Preserving Time Instants
(https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-time-instants.html)
for details. Under this new
mechanism, the default behavior of Connector/J 5.1 in
this respect is preserved by setting the connection
property preserveInstants=false. (Bug #30962953, Bug
#98695, Bug #30573281, Bug #95644)

* Conversion of a MySQL DATETIME or TIMESTAMP value to a
Java OffsetDateTime using the getObject(i,
OffsetDateTime.class) method failed with a “Conversion
not supported for type …” error. It was because the
OffsetDateTime.parse() method on DATETIME and TIMESTAMP
values yielded an unexpected string format. With this
patch, conversions between OffsetDateTime and the DATE,
TIME, DATETIME, TIMESTAMP, and YEAR data types are now
possible, and an instant point on the timeline is
preserved as such during a conversion, when
possible—see Preserving Time Instants
(https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-time-instants.html)
for details. (Bug #29402209, Bug #94457)

Mysql Connector/j

* When the server’s session time zone setting was not
understandable by Connector/J (for example, it was set to
CEST), a connection could not be established with the
server unless Connector/J specified the correct IANA time
zone name in the serverTimezone connection property. This
happened even if there was actually no need to use any
date-time functionality in Connector/J. The issue was
fixed by the new connection properties for Connector/J
that control date-time handling—see Preserving Time Instants
(https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-time-instants.html)
for details. The following now
happens with respect to the above-mentioned situation:

Mysql Connector/j Documentation

  • If the new connection property connectionTimeZone is
    set to LOCAL or a specified time zone, the time_zone
    variable on the server is no longer checked

  • If connectionTimeZone=SERVER, the check for the
    time_zone variable is delayed until date-time driver
    functionality is first invoked, so that an
    unrecognizable server time zone does not prevent
    connection to be established. However, when
    date-time functionality is invoked and the value of
    time_zone cannot be recognized by Connector/J, an
    exception is thrown.

(Bug #21789378)

Enjoy and thanks for the support!

On behalf of the MySQL Release Team,
Balasubramanian Kandasamy

Connector/J

Mysql Connector/j Maven

MySQL provides standards-based drivers for JDBC, ODBC, and .Net enabling developers to build database applications in their language of choice. In addition, a native C library allows developers to embed MySQL directly into their applications.

Developed by MySQL
ADO.NET Driver for MySQL (Connector/NET)Download
ODBC Driver for MySQL (Connector/ODBC)Download
JDBC Driver for MySQL (Connector/J)Download
Node.js Driver for MySQL (Connector/Node.js)Download
Python Driver for MySQL (Connector/Python)Download
C++ Driver for MySQL (Connector/C++)Download
C Driver for MySQL (Connector/C)Download
C API for MySQL (mysqlclient)Download

These drivers are developed and maintained by the MySQL Community.

Mysql Connector/j Windows

Developed by Community
PHP Drivers for MySQL
(mysqli, ext/mysqli, PDO_MYSQL, PHP_MYSQLND)
Download
Perl Driver for MySQL (DBD::mysql)Download
Ruby Driver for MySQL (ruby-mysql)Download
C++ Wrapper for MySQL C API (MySQL++)Download