MySQL Connector/J的文档里说:MySQL Connector/J is distributed as a .zip or .tar.gz archive containing the sources, the class files a class-file only "binary" .jar archive named "mysql-connector-java-[version]-bin.jar", and starting with Connector/J 3.1.8 a "debug" build of the driver in a file named "mysql-connector-java-[version]-bin-g.jar".MySQL Connector/J作为一个.zip或.tar.gz文档分发,它包含源码、class文件......(翻不出来)一个名为mysql-connector-java-[version]-bin.jar的只有binary的class文件的.jar文件。从3.1.8版本开始,也包含一个名为mysql-connector-java-[version]-bin-g.jar中的debug版本的启动器。You should not use the "debug" build of the driver unless instructed do do so when reporting a problem or bug to MySQL AB, as it is not designed to be run in production environments, and will have adverse performance impact when used. The debug binary also depends on the Aspect/J runtime library, which is located in the src/lib/aspectjrt.jar file that comes with the Connector/J distribution.不应该使用debug版本的驱动器,除非......向MySQL AB报告问题或bug......。debug版本也依赖Aspect/J运行时间库,它位于与Connector/J一起分发的src/lib/aspectjrt.jar文件中。

解决方案 »

  1.   

    Once you have extracted the distribution archive, you can install the driver by placing mysql-connector-java-[version]-bin.jar in your classpath, either by adding the FULL path to it to your CLASSPATH enviornment variable, or by directly specifying it with the commandline switch -cp when starting your JVM当你从分发的文件中提取出来,你就可以以两种方式安装驱动器把mysql-connector-java-[version]-bin.jar放到你的classpath:在CLASSPATH环境变量中加入它的全路径名,或者当启动虚拟机时在命令行开关-cp中直接指定它。If you are going to use the driver with the JDBC DriverManager, you would use "com.mysql.jdbc.Driver" as the class that implements java.sql.Driver.如果你要通过JDBC DeiverManager使用驱动器,你应该用com.mysql.jdbc.Driver作为java.sql.Driver的实现类。
      

  2.   

    一般来说使用mysql-connector-java-3.1.10-bin.jar