MySQL provides connectivity for client applications developed in the Java programming language with MySQL Connector/J. Connector/J implements the Java Database Connectivity (JDBC) API, as well as a number of value-adding extensions of it. It also supports the new X DevAPI.
MySQL Connector/J is a JDBC Type 4 driver, implementing the JDBC 4.2 specification. The Type 4 designation means that the driver is a pure Java implementation of the MySQL protocol and does not rely on the MySQL client libraries. See Section 3.2, “Compatibility with MySQL and Java Versions” for compatibility information.
Connector/J 8.0 provides ease of development features
including auto-registration with the Driver Manager, standardized
validity checks, categorized SQLExceptions, support for large
update counts, support for local and offset date-time variants
from the java.time
package, support for
JDBC-4.x XML processing, support for per connection client
information, and support for the
NCHAR
,
NVARCHAR
and
NCLOB
data types. See
Section 3.2, “Compatibility with MySQL and Java Versions” for compatibility
information.
For large-scale programs that use common design patterns of data access, consider using one of the popular persistence frameworks such as Hibernate, Spring's JDBC templates or MyBatis SQL Maps to reduce the amount of JDBC code for you to debug, tune, secure, and maintain.
Key Topics
For installation instructions for Connector/J, see Section 3.3, “Connector/J Installation”.
For help with connection strings, connection options, and setting up your connection through JDBC, see Section 3.5, “Connector/J Reference”.
For information on connection pooling, see Section 3.7, “Connection Pooling with Connector/J”.
For information on multi-host connections, see Section 3.8, “Multi-Host Connections”.
For information on using the X DevAPI with Connector/J, see Section 3.9, “Using the X DevAPI with Connector/J: Special Topics”.