MySQL provides connectivity for client applications developed in the Java programming language with MySQL Connector/J, a driver that implements the Java Database Connectivity (JDBC) API.
MySQL Connector/J is a JDBC Type 4 driver. Different versions are available that are compatible with the JDBC 3.0 and JDBC 4.x specifications (see Chapter 2, Connector/J Versions). 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.
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 Ibatis SQL Maps to reduce the amount of JDBC code for you to debug, tune, secure, and maintain.
For installation instructions for Connector/J, see Chapter 3, Connector/J Installation.
For help with connection strings, connection options, and setting up your connection through JDBC, see Section 5.1, “Driver/Datasource Class Names, URL Syntax and Configuration Properties for Connector/J”.
For information on connection pooling, see Chapter 7, Connection Pooling with Connector/J.
For information on multi-host connections, see Chapter 8, Multi-Host Connections.