驱动没错。。解压后有文档说明的。。你找找。。里面有具体连接数据库的例子。。
压缩包里有个 .jar  的文件。。就是mysql 的驱动了。。
你用的什么工具开发的??把那个 .jar  如果是tomcat 的话 放在对应安装路径lib 文件下。。
或者你用开发工具引入这个包也行。。不知有哪说错的地方。请见谅。。^_^。。

解决方案 »

  1.   

    放在 lib 目录下就可以了..
      

  2.   


    写个类连接测试一下就可以了。网上有好多这样的例子,google一下就找到了
      

  3.   

    放在应用程序的WEB-INF\lib目录下
    下面是我封装的一个数据库连接的例子,你看看:
    package xinem;import java.sql.*;public class DB {
    final static String url = "jdbc:mysql://localhost:3306/bbs";

    public static Connection getConn(){
    Connection conn = null;
    try {
    Class.forName("com.mysql.jdbc.Driver");
    conn = DriverManager.getConnection(url,"root","root");
    } catch (ClassNotFoundException e) {
    e.printStackTrace();
    } catch (SQLException e) {
    e.printStackTrace();
    }
    return conn;
    }

    public static Statement createStm(Connection conn){
    Statement stm = null;
    try {
    stm = conn.createStatement();
    } catch (SQLException e) {
    e.printStackTrace();
    }
    return stm;
    }

    public static PreparedStatement createPStm(Connection conn,String sql) {
    PreparedStatement PStm = null;
    try {
    PStm = conn.prepareStatement(sql);
    } catch (SQLException e) {
    e.printStackTrace();
    }
    return PStm;
    }

    public static ResultSet executeQuery(Statement stm,String sql) {
    ResultSet rs = null;
    try {
    rs = stm.executeQuery(sql);
    } catch (SQLException e) {
    e.printStackTrace();
    }
    return rs;
    }

    public static int executeUpdate(Statement stm,String sql){
    int rsInt = 0;
    try {
    rsInt = stm.executeUpdate(sql);
    } catch (SQLException e) {
    e.printStackTrace();
    }
    return rsInt;
    }
    public static void close(Connection conn){
    if( conn != null){
    try {
    conn.close();
    } catch (SQLException e) {
    e.printStackTrace();
    }
    conn = null;
    }
    }

    public static void close(Statement stm){
    if( stm != null){
    try {
    stm.close();
    } catch (SQLException e) {
    e.printStackTrace();
    }
    stm = null;
    }
    }
    public static void close(ResultSet rs){
    if( rs != null){
    try {
    rs.close();
    } catch (SQLException e) {
    e.printStackTrace();
    }
    rs = null;
    }
    }

    public static void close(ResultSet rs,Statement stm,Connection conn){
    close(rs);
    close(stm);
    close(conn);
    }

    }
      

  4.   

    看你是做WEB开发还是只是测试,如果测试,只需要把他直接倒入你的项目就可以了.引入外部JAR包!
      

  5.   

    如果是用jdk的话,放在jdk的lib目录下,用其它的也同样,放到相应的lib目录下就可以用了,public static void main(String[] args) {
    // TODO 自动生成方法存根
    String tableName = null;// 表名
    BufferedReader input = new BufferedReader(new InputStreamReader(
    System.in));
    try {
    Class.forName("com.mysql.jdbc.Driver");// 加载驱动程序
    System.out.println("OK,DownLoad the driver");
    // ?user=root&password=123456&useUnicode=true&characterEncoding=UTF-8
    Connection con = DriverManager
    .getConnection("jdbc:mysql://localhost/test?user=root&password=123456789 &useUnicode=true&characterEncoding=UTF-8");
    con.setCatalog("test");
    System.out.println("GOOG,Connect the DataBase");
    Statement statement = con.createStatement();// 数据库操作
    System.out.print("请输入表名:");
    tableName = input.readLine(); String sql = "SELECT * FROM " + tableName;
    ResultSet rs = statement.executeQuery(sql);
    System.out.print("请输入列名:");
    String cName = input.readLine();
    // 获得数据结果集合
    if (!rs.next())
    System.out.println("表名或列名输入有误或到了末尾");
    else {
    System.out.println("查询结果为:");
    do {
    String result = rs.getString(cName);
    result = new String(result.getBytes("ISO-8859-1"),
    "gbk2312");
    System.out.println(result);
    } while (rs.next());
    }
    rs.close();
    con.close();
    } catch (Exception ex) {
    System.out.println(ex);
    System.exit(0);
    }
    }
      

  6.   

    放到lib目录中,和导入工程中都可以的