Bug #4639 cannot connect to mysql
Submitted: 20 Jul 2004 3:32 Modified: 20 Jul 2004 3:53
Reporter: gauri deshmukh Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / J Severity:S2 (Serious)
Version:3.0.14 OS:Windows (Windows xp)
Assigned to: CPU Architecture:Any

[20 Jul 2004 3:32] gauri deshmukh
Description:
Hi,

   I have downloaded the mysql-connector-java-3.0.14-production connecotr/J form your website. I am trying to establish a connection with mysql with the following example:
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class JdbcExample2 {

  public static void main(String args[]) {
    Connection con = null;

    try {
      Class.forName(".com.mysql.jdbc.Driver").newInstance();
      con = DriverManager.getConnection("jdbc:mysql:///test");

      if(!con.isClosed())
        System.out.println("Successfully connected to " +
          "MySQL server using TCP/IP...");

    } catch(Exception e) {
      System.err.println("Exception: " + e.getMessage());
    } finally {
      try {
        if(con != null)
          con.close();
      } catch(SQLException e) {}
    }
  }
}

My classpath is set as follows:
c:\connector\com\mysql\jdbc;c:\connector\org;c:\java\example;

(your website suggested putting the com and org dirs in a separate dir.)
 however i keep getting the error:
connector.com.mysql.jdbc.Driver

Why is this happening? I have tried to put the jar file in classpath and in the jre/lib/ext dir ..but nothing works......I have been trying to resolve this isssue for about a week now........please help/
    Thanks,
        Gauri.

How to repeat:
repeat
[20 Jul 2004 3:53] Mark Matthews
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem is not the result of a bug.
For a list of more appropriate places to ask for help using MySQL
products, please visit http://www.mysql.com/support/

Thank you for your interest in MySQL.