MySQL Blog Archive
For the latest blogs go to
MySQL Connector/J 8.0.19 has been released

Dear MySQL users,

MySQL Connector/J 8.0.19 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.

To download MySQL Connector/J 8.0.19 GA, see the “General Availability
(GA) Releases” tab at


Changes in MySQL Connector/J 8.0.19 (2020-01-13, General Availability)

Functionality Added or Changed

     * Connector/J now supports the use of DNS SRV records for
       connections.  Here is a brief summary for Connector/J’s support
       for DNS SRV records:

          + These new schemas in the connection URLs enable DNS
            SRV support:
               o jdbc:mysql+srv: For ordinary and basic failover
                 JDBC connections that make use of DNS SRV
               o jdbc:mysql+srv:loadbalance: For load-balancing
                 JDBC connections that make use of DNS SRV
               o jdbc:mysql+srv:replication: For replication
                 JDBC connections that make use of DNS SRV
               o mysqlx+srv: For X DevAPI connections that make
                 use of DNS SRV records.

          + Besides using the new schemas in the connection
            URLs, DNS SRV record support can also be enabled or
            disabled using the two new connection properties,
            dnsSrv and xdevapi.dns-srv, for JDBC and X DevAPI
            connections respectively.
       See Support for DNS SRV Records
       in the Connector/J 8.0 Developer Guide
( for

     * X DevAPI: The server failover support for connections
       using X DevAPI has been enhanced with the following features:

          + When the priority property is NOT set for each host
            in the connection URL, failover connections are
            attempted on the hosts in a random order, until a
            connection is successfully established (Connector/J
            used to attempt connections to the hosts in the
            sequence they appear in the connection URL).

          + Once all hosts have been tried and no connections
            can be made, Connector/J throws a
            and returns the message Unable to connect to any of
            the target hosts.

          + When using connection pooling, Connector/J keeps
            track of any host it failed to connect to and, for a
            short waiting period after the failure, avoids
            connecting to it during the creation or retrieval of
            a Session. However, if all other hosts have already
            been tried, those excluded hosts will be retried
            without waiting. Once all hosts have been tried and
            no connections can be established, Connector/J
            throws a
            and returns the message Unable to connect to any of
            the target hosts.

     * X DevAPI: The allowed TLS versions and cipher suites for
       X DevAPI connections can now be restricted by two new
       connection properties:

          + xdevapi.tls-versions restricts the allowable TLS
            protocol versions to be used for X DevAPI

          + xdevapi.tls-ciphersuites restricts the allowable
            cipher suites to be used for X DevAPI connections.
       See the descriptions for them in Configuration Properties
       and also Connecting Securely Using SSL
       for details.

     * MySQL Server 8.0.17 deprecated the display width for the
       TINYINT, SMALLINT, MEDIUMINT, INT, and BIGINT data types when the
       ZEROFILL modifier is not used, and MySQL Server 8.0.19 has
       removed the display width for those data types from results of
       INFORMATION_SCHEMA.PARAMETERS (except for the display width for
       signed TINYINT(1)). This patch adjusts Connector/J to those
       recent changes of MySQL Server and, as a result,
       DatabaseMetaData, ParameterMetaData, and ResultSetMetaData now
       report identical results for all the above-mentioned integer
       types and also for the FLOAT and DOUBLE data types.
       (Bug #30477722)

     * The cipher suites usable by Connector/J are now
       pre-restricted by a properties file that can be found at
       src/main/resources/com/mysql/cj/ inside the
       src folder on the source tree or in the platform-independent
       distribution archive (in .tar.gz or .zip format) for Connector/J.
       See Connecting Securely Using SSL
       for details.

     * The allowable versions of TLS protocol used for
       connecting to the server, when no restrictions have been set
       using the connection properties enabledTLSProtocols, have been
       changed to:

          + TLSv1, TLSv1.1, TLSv1.2, and TLSv1.3 for MySQL
            Community Servers 8.0, 5.7.28 and later, and 5.6.46
            and later, and for all commercial versions of MySQL

          + TLSv1 and TLSv1.1 for all other versions of MySQL

Bugs Fixed

     * The RPM package for Connection/J provided by the MySQL
       Yum repository did not have its epoch set; as a result, the
       package could not be installed on an Enterprise Linux or Fedora
       system even if the MySQL Yum repository has been enabled, because
       the Connector/J package in the native repository had the epoch
       set to 1. This fix sets the epoch also to 1 for the RPM package
       provided by the MySQL Yum repository, in order to prevent the
       installation problem. (Bug #30566384, Bug #97700)

     * For some prepared statements, calling getMetaData() on
       them resulted in an Incorrect DATE error, even when no DATE
       values were involved. This was due to some recent changes on the
       MySQL 8.0 Server, to which this patch adjusts Connector/J. (Bug
       #30151808, Bug #96442) References: See also: Bug #29025656,
       Bug #28940878.

     * When retrieving TIME values using
       ResultSet.getTimestamp(), the fractional seconds are truncated
       when useCursorFetch=true. This patch corrects the problem by
       fixing the TIME value decoding in the MysqlBinaryValueDecoder. It
       also corrects some inconsistencies in formatting the fractional
       seconds when returning the TIME values as strings.
       (Bug #30119545, Bug #96383)

     * Streaming of multiple result sets failed with an error.
       It was due to an error in switching the streamer source from one
       result set to another, and this fix corrects the issue.
       (Bug #29999318, Bug #96059)

Enjoy and thanks for the support!

On behalf of the MySQL Release Team,
Nawaz Nazeer Ahamed