This section describes some of the more important changes to the Connector/J API going from version 5.1 to 8.0 and beyond. You might need to adjust your API calls accordingly:
The name of the class that implements
java.sql.Driverin MySQL Connector/J has changed fromcom.mysql.jdbc.Drivertocom.mysql.cj.jdbc.Driver. The old class name has been deprecated.-
The names of these commonly-used classes and interfaces have also been changed:
ExceptionInterceptor: from
com.mysql.jdbc.ExceptionInterceptortocom.mysql.cj.exceptions.ExceptionInterceptorStatementInterceptor: from
com.mysql.jdbc.StatementInterceptorV2tocom.mysql.cj.interceptors.QueryInterceptorConnectionLifecycleInterceptor: from
com.mysql.jdbc.ConnectionLifecycleInterceptortocom.mysql.cj.jdbc.interceptors.ConnectionLifecycleInterceptorAuthenticationPlugin: from
com.mysql.jdbc.AuthenticationPlugintocom.mysql.cj.protocol.AuthenticationPluginBalanceStrategy: from
com.mysql.jdbc.BalanceStrategytocom.mysql.cj.jdbc.ha.BalanceStrategyMysqlDataSource: from
com.mysql.jdbc.jdbc2.optional.MysqlDataSourcetocom.mysql.cj.jdbc.MysqlDataSourceMysqlDataSourceFactory: from
com.mysql.jdbc.jdbc2.optional.MysqlDataSourceFactorytocom.mysql.cj.jdbc.MysqlDataSourceFactoryMysqlConnectionPoolDataSource: from
com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSourcetocom.mysql.cj.jdbc.MysqlConnectionPoolDataSourceMysqlXADataSource: from
com.mysql.jdbc.jdbc2.optional.MysqlXADataSourcetocom.mysql.cj.jdbc.MysqlXADataSourceMysqlXid: from
com.mysql.jdbc.jdbc2.optional.MysqlXidtocom.mysql.cj.jdbc.MysqlXid