MySQL Connector/J Developer Guide

Abstract

This manual describes how to install, configure, and develop database applications using MySQL Connector/J, the JDBC driver for communicating with MySQL servers.

For notes detailing the changes in each release of Connector/J, see MySQL Connector/J Release Notes.

Document generated on: 2014-08-30 (revision: 39874)


Table of Contents

Preface and Legal Notices
1 Overview of MySQL Connector/J
2 Connector/J Versions
2.1 Connector/J Release Notes and Change History
2.2 Java Versions Supported
3 Connector/J Installation
3.1 Installing Connector/J from a Binary Distribution
3.2 Installing the Driver and Configuring the CLASSPATH
3.3 Upgrading from an Older Version
3.3.1 Upgrading to MySQL Connector/J 5.1.x
3.3.2 JDBC-Specific Issues When Upgrading to MySQL Server 4.1 or Newer
3.3.3 Upgrading from MySQL Connector/J 3.0 to 3.1
3.4 Installing from the Development Source Tree
4 Connector/J Examples
5 Connector/J (JDBC) Reference
5.1 Driver/Datasource Class Names, URL Syntax and Configuration Properties for Connector/J
5.1.1 Properties Files for the useConfigs Option
5.2 JDBC API Implementation Notes
5.3 Java, JDBC and MySQL Types
5.4 Using Character Sets and Unicode
5.5 Connecting Securely Using SSL
5.6 Connecting Using PAM Authentication
5.7 Using Master/Slave Replication with ReplicationConnection
5.8 Mapping MySQL Error Numbers to JDBC SQLState Codes
6 JDBC Concepts
6.1 Connecting to MySQL Using the JDBC DriverManager Interface
6.2 Using JDBC Statement Objects to Execute SQL
6.3 Using JDBC CallableStatements to Execute Stored Procedures
6.4 Retrieving AUTO_INCREMENT Column Values through JDBC
7 Connection Pooling with Connector/J
8 Multi-Host Connections
8.1 Configuring Load Balancing with Connector/J
8.2 Configuring Failover with Connector/J
8.3 Master/Slave Replication with ReplicationConnection
9 Using the Connector/J Interceptor Classes
10 Using Connector/J with Tomcat
11 Using Connector/J with JBoss
12 Using Connector/J with Spring
12.1 Using JdbcTemplate
12.2 Transactional JDBC Access
12.3 Connection Pooling with Spring
13 Using Connector/J with GlassFish
13.1 A Simple JSP Application with GlassFish, Connector/J and MySQL
13.2 A Simple Servlet with GlassFish, Connector/J and MySQL
14 Using Connector/J with MySQL Fabric
15 Troubleshooting Connector/J Applications
16 Known Issues and Limitations
17 Connector/J Support
17.1 Connector/J Community Support
17.2 How to Report Connector/J Bugs or Problems
A Licenses for Third-Party Components
A.1 Ant-Contrib License
A.2 c3p0 JDBC Library License
A.3 GNU Lesser General Public License Version 2.1, February 1999
A.4 jboss-common-jdbc-wrapper.jar License
A.5 NanoXML License
A.6 rox.jar License
A.7 Simple Logging Facade for Java (SLF4J) License