MySQL Connector/J
Copyright 1997-2008 MySQL AB, 2008 Sun Microsystems, Inc.
This documentation is NOT distributed under a GPL license.
Use of this documentation is subject to the following terms:
You may create a printed copy of this documentation solely
for your own personal use. Conversion to other formats is
allowed as long as the actual content is not altered or
edited in any way. You shall not publish or distribute this
documentation in any form or on any media, except if you
distribute the documentation in a manner similar to how Sun
disseminates it (that is, electronically for download on a
Web site with the software) or on a CD-ROM or similar medium,
provided however that the documentation is disseminated
together with the software on the same medium. Any other use,
such as any dissemination of printed copies or use of this
documentation, in whole or in part, in another publication,
requires the prior written consent from an authorized
representative of Sun Microsystems, Inc. Sun Microsystems,
Inc. and MySQL AB reserve any and all rights to this
documentation not expressly granted above.
For more information on the terms of this license, for
details on how the MySQL documentation is built and produced,
or if you are interested in doing a translation, please
contact us at docs@mysql.com.
If you want help with using MySQL, please visit either the
MySQL Forums (http://forums.mysql.com) or MySQL Mailing Lists
(http://lists.mysql.com) where you can discuss your issues
with other MySQL users.
For additional documentation on MySQL products, including
translations of the documentation into other languages, and
downloadable versions in variety of formats, including HTML,
CHM and PDF formats, see MySQL Documentation Library
(http://dev.mysql.com/doc).
Abstract
This manual describes MySQL Connector/J, the JDBC
implementation for communicating with MySQL servers.
Document generated on: 2008-10-21 (revision: 12106)
________________________________________________________
MySQL Connector/J
MySQL provides connectivity for client applications developed
in the Java programming language via a JDBC driver, which is
called MySQL Connector/J.
MySQL Connector/J is a JDBC Type 4 driver. Different versions
are available that are compatible with the JDBC 3.0 and JDBC
4.0 specifications. The Type 4 designation means that the
driver is pure-Java implementation of the MySQL protocol and
does not rely on the MySQL client libraries.
Although JDBC is useful by itself, we would hope that if you
are not familiar with JDBC that after reading the first few
sections of this manual, that you would avoid using naked
JDBC for all but the most trivial problems and consider using
one of the popular persistence frameworks such as Hibernate
(http://www.hibernate.org/), Spring's JDBC templates
(http://www.springframework.org/) or Ibatis SQL Maps
(http://ibatis.apache.org/) to do the majority of repetitive
work and heavier lifting that is sometimes required with
JDBC.
This section is not designed to be a complete JDBC tutorial.
If you need more information about using JDBC you might be
interested in the following online tutorials that are more
in-depth than the information presented here:
* JDBC Basics
(http://java.sun.com/docs/books/tutorial/jdbc/basics/inde
x.html) --- A tutorial from Sun covering beginner topics
in JDBC
* JDBC Short Course
(http://java.sun.com/developer/onlineTraining/Database/JD
BCShortCourse/index.html) --- A more in-depth tutorial
from Sun and JGuru
Key topics:
* For help with connection strings, connection options
setting up your connection through JDBC, see Section 4.1,
"Driver/Datasource Class Names, URL Syntax and
Configuration Properties for Connector/J."
* For tips on using Connector/J and JDBC with generic J2EE
toolkits, see Section 5.2, "Using Connector/J with J2EE
and Other Java Frameworks."
* Developers using the Tomcat server platform, see Section
5.2.2, "Using Connector/J with Tomcat."
* Developers using JBoss, see Section 5.2.3, "Using
Connector/J with JBoss."
* Developers using Spring, see Section 5.2.4, "Using
Connector/J with Spring."
MySQL Enterprise MySQL Enterprise subscribers will find more
information about using JDBC with MySQL in the Knowledge Base
articles about JDBC
(https://kb.mysql.com/search.php?cat=search&category=10).
Access to the MySQL Knowledge Base collection of articles is
one of the advantages of subscribing to MySQL Enterprise. For
more information see
http://www.mysql.com/products/enterprise/advisors.html.
Chapter 1. Connector/J Versions
There are currently four versions of MySQL Connector/J
available:
* Connector/J 5.1 is the Type 4 pure Java JDBC driver,
which conforms to the JDBC 3.0 and JDBC 4.0
specifications. It provides compatibility with all the
functionality of MySQL, including 4.1, 5.0, 5.1 and the
6.0 alpha release featuring the new Falcon storage
engine. Connector/J 5.1 provides ease of development
features, including auto-registration with the Driver
Manager, standardized validity checks, categorized
SQLExceptions, support for the JDBC-4.0 XML processing,
per connection client information, NCHAR, NVARCHAR and
NCLOB types. This release also includes all bug fixes up
to and including Connector/J 5.0.6.
* Connector/J 5.0 provides support for all the
functionality offered by Connector/J 3.1 and includes
distributed transaction (XA) support.
* Connector/J 3.1 was designed for connectivity to MySQL
4.1 and MySQL 5.0 servers and provides support for all
the functionality in MySQL 5.0 except distributed
transaction (XA) support.
* Connector/J 3.0 provides core functionality and was
designed with connectivity to MySQL 3.x or MySQL 4.1
servers, although it will provide basic compatibility
with later versions of MySQL. Connector/J 3.0 does not
support server-side prepared statements, and does not
support any of the features in versions of MySQL later
than 4.1.
The following table summarizes the Connector/J versions
available:
Connector/J version Driver Type JDBC version MySQL Server
version Status
5.1 4 3.0, 4.0 4.1, 5.0, 5.1, 6.0 Recommended version
5.0 4 3.0 4.1, 5.0 Released version
3.1 4 3.0 4.1, 5.0 Obsolete
3.0 4 3.0 3.x, 4.1 Obsolete
The current recommended version for Connector/J is 5.1. This
guide covers all four connector versions, with specific notes
given where a setting applies to a specific option.
1.1. Java Versions Supported
The following table summarizes Connector/J Java dependencies:
Connector/J version Java RTE required JDK required (to build
source code)
5.1 1.3.x, 1.4.x, 1.5.x, 1.6.x 1.6.x and 1.5.x (or older)
5.0 1.3.x, 1.4.x, 1.5.x, 1.6.x 1.4.2, 1.5.x, 1.6.x
3.1 1.2.x, 1.3.x, 1.4.x, 1.5.x, 1.6.x 1.4.2, 1.5.x, 1.6.x
3.0 1.2.x, 1.3.x, 1.4.x, 1.5.x, 1.6.x 1.4.2, 1.5.x, 1.6.x
MySQL Connector/J does not support JDK-1.1.x or JDK-1.0.x.
Because of the implementation of java.sql.Savepoint,
Connector/J 3.1.0 and newer will not run on a Java runtime
older than 1.4 unless the class verifier is turned off (by
setting the -Xverify:none option to the Java runtime). This
is because the class verifier will try to load the class
definition for java.sql.Savepoint even though it is not
accessed by the driver unless you actually use savepoint
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
完整的韩顺平零基础30天学会Java学习资料包括各章节完整笔记代码。 1) 以培养编程思想、提升编程能力为核心目标,达到能分析业务需求,并能用代码实现水平 2) 抛弃传统的以强灌知识点授课方式,每个阶段都有多个项目把知识点真正应用到项目中, 小伙伴在学习过程中有满满成就感,充分体会编程乐趣 3) 课程成完整体系,超全,超详细。 4) 充分考虑零基础小伙伴,通俗易懂 5) 宁肯慢点,也不遗漏细节。[包括软件安装、开发环境配置和使用] 6) 项目是从小到大的过程,项目分解成不同的功能模块,随功能的增加,将知识点融入到项目,整个过程是循序渐进的。 让大家轻松的学,高效的学。 7) 为减轻小伙伴学习压力,将课程分为三个阶段,小伙伴可以根据当前水平,选择从某个阶段开始学习 8) 零基础的小伙伴,老韩强烈建议从第一阶段开始学习. 9) 因为课程内容非常全,录制周期长,老韩也会根据实际情况做微调
资源推荐
资源详情
资源评论
收起资源包目录
韩顺平零基础30天学会Java学习资料 (2000个子文件)
Test.class 44KB
MyPanel.class 8KB
MHLView.class 8KB
MyPanel.class 8KB
MyPanel.class 6KB
HouseView.class 5KB
EnemyTank.class 4KB
EnemyTank.class 4KB
JDBCUtilsByDruid_USE.class 4KB
QQServer.class 4KB
QQView.class 4KB
MyPanel.class 4KB
MyPanel.class 4KB
Recorder.class 4KB
Recorder.class 4KB
ServerConnectClientThread.class 4KB
UserClientService.class 3KB
HorseChessBoard.class 3KB
JdbcConn.class 3KB
SmallChangeSysOOP.class 3KB
TestTemp.class 3KB
DBUtils_USE.class 3KB
MyPanel.class 3KB
BasicDAO.class 3KB
BasicDAO.class 3KB
BillService.class 3KB
Utility.class 3KB
Utility.class 3KB
MultiTableBean.class 3KB
Utility.class 3KB
Utility.class 3KB
JDBCUtils_Use.class 3KB
SmallChangeSys.class 3KB
MapFor.class 3KB
Tiger.class 3KB
Bill.class 3KB
FileClientService.class 3KB
SendNewsToAllService.class 3KB
ClientConnectServerThread.class 3KB
GenericExercise.class 2KB
Collections_.class 2KB
Statement_.class 2KB
PreparedStatement_.class 2KB
ResultSet_.class 2KB
C3P0_.class 2KB
Homework03Server.class 2KB
MessageClientService.class 2KB
Homework03.class 2KB
Batch_.class 2KB
PreparedStatementDML_.class 2KB
Reflection01.class 2KB
Homework13.class 2KB
AePlayWave.class 2KB
Homework03.class 2KB
Transaction_.class 2KB
ManageClientThreads.class 2KB
TestDAO.class 2KB
Message.class 2KB
Message.class 2KB
GenericExtends.class 2KB
Homework03Client.class 2KB
DAO.class 2KB
Actor.class 2KB
Actor.class 2KB
Homework01Server.class 2KB
DiningTableService.class 2KB
ReflecCreateInstance.class 2KB
SocketTCP03Server.class 2KB
FileReader_.class 2KB
EnemyTank.class 2KB
Class02.class 2KB
FileInputStream_.class 2KB
SocketTCP03Client.class 2KB
Person.class 2KB
House.class 2KB
RegTheory.class 2KB
Teacher.class 2KB
LinkedListCRUD.class 2KB
Account.class 2KB
MapExercise.class 2KB
ListExercise02.class 2KB
Season2.class 2KB
MapSource_.class 2KB
Homework01Client.class 2KB
SocketTCP02Server.class 2KB
TCPFileUploadServer.class 2KB
GetClass_.class 2KB
Color.class 2KB
MatcherMethod.class 2KB
Directory_.class 2KB
SocketTCP02Client.class 2KB
JDBCUtils.class 2KB
MapMethod.class 2KB
MoraGame.class 2KB
BufferedCopy02.class 2KB
MyDate.class 2KB
HouseService.class 2KB
StringToBasic.class 2KB
Doctor.class 2KB
Homework02ReceiverA.class 2KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
JamesTosling
- 粉丝: 112
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功