MySQL Connector/J
5.1 Developer Guide
1. MysQL为由Java语言编程的客户端程序提供连接:MySQL Connector/J,这是一个实现Java Database Connectivity(JDBC) API的驱动.
2.MySQL Connector/J 是一个JDBC Type 4驱动.类型4表示该驱动是纯Java实现MySQL协议,并且不依赖MySQL客户端库.
3.对于大型程序that use common design patterns of data access,考虑使用流行的persistence框架,例如Hibernate,Spring's JDBC templates 或者MyBatis SQL Maps来减少debug,tune,secure和维护的JDBC代码的数量.
4.Connector/J 5.1 是Type 4 pure Java JDBC driver,符合JDBC 3.0,4.0,4.1和4.2规范.
5.Installation
distributed as a .zip or .tar.gz archive.
The archive contains the sources and JAR archive named mysql-connector-java-version-bin.jar.
You can install the Connector/J package using either the binary or source distribution.
二进制的安装最简单.源distribution允许你深度定制你的安装.
两者都需要将Connector/J的位置添加到Java CLASSPATH中.
Connector/J也适用于Maven项目.
一. 解压下载的文件.
二. 解压后,可以通过将 mysql-connector-java-
version
-bin.jar放入classpath中,或者添加全路径到CLASSPATH环境变量.
To use the driver with the JDBC DriverManager, use com.mysql.jdbc.Driver as the class that implements java.sql.Driver.