Documentation Home
MySQL Connector/J 5.1 Developer Guide
Related Documentation Download this Manual
PDF (US Ltr) - 507.2Kb
PDF (A4) - 509.4Kb
HTML Download (TGZ) - 123.0Kb
HTML Download (Zip) - 142.5Kb


MySQL Connector/J 5.1 Developer Guide

Abstract

This manual describes how to install, configure, and develop database applications using MySQL Connector/J 5.1, a JDBC driver for communicating with MySQL servers. It also contains information on earlier versions of Connector/J.

Note

MySQL Connector/J 8.0 is highly recommended for use with MySQL Server 8.0, 5.7, and 5.6. Please upgrade to MySQL Connector/J 8.0.

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

For legal information, see the Legal Notices.

For help with using MySQL, please visit the MySQL Forums, where you can discuss your issues with other MySQL users.

Licensing information.  This product may include third-party software, used under license. If you are using a Commercial release of MySQL Connector/J 5.1, see the MySQL Connector/J 5.1 Commercial License Information User Manual for licensing information, including licensing information relating to third-party software that may be included in this Commercial release. If you are using a Community release of MySQL Connector/J 5.1, see the MySQL Connector/J 5.1 Community License Information User Manual for licensing information, including licensing information relating to third-party software that may be included in this Community release.

Document generated on: 2020-06-02 (revision: 66153)

Table of Contents

Preface and Legal Notices
1 Overview of MySQL Connector/J
2 Connector/J Versions, and the MySQL and Java Versions They Require
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 Source
3.5 Testing Connector/J
4 Connector/J Examples
5 Connector/J (JDBC) Reference
5.1 Driver/Datasource Class Name
5.2 Connection URL Syntax
5.3 Configuration Properties for Connector/J
5.4 JDBC API Implementation Notes
5.5 Java, JDBC and MySQL Types
5.6 Using Character Sets and Unicode
5.7 Connecting Securely Using SSL
5.8 Connecting Using Unix Domain Sockets
5.9 Connecting Using Named Pipes
5.10 Connecting Using PAM Authentication
5.11 Using Master/Slave Replication with ReplicationConnection
5.12 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 Server Failover
8.2 Configuring Load Balancing with Connector/J
8.3 Configuring Master/Slave Replication with Connector/J
8.4 Advanced Load-balancing and Failover Configuration
9 Using the Connector/J Interceptor Classes
10 Using Logging Frameworks with SLF4J
11 Using Connector/J with Tomcat
12 Using Connector/J with JBoss
13 Using Connector/J with Spring
13.1 Using JdbcTemplate
13.2 Transactional JDBC Access
13.3 Connection Pooling with Spring
14 Using Connector/J with GlassFish
14.1 A Simple JSP Application with GlassFish, Connector/J and MySQL
14.2 A Simple Servlet with GlassFish, Connector/J and MySQL
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
Index