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:
Category:Connector / J Severity:S2 (Serious)
Version:3.0.14 OS:Microsoft Windows (Windows xp)
Assigned to: CPU Architecture:Any

[20 Jul 2004 3:32] gauri deshmukh

   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 {
      con = DriverManager.getConnection("jdbc:mysql:///test");

        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)
      } catch(SQLException e) {}

My classpath is set as follows:

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

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/

How to 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.