2 messages in com.mysql.lists.javaRe: MySql Problem
FromSent OnAttachments
java...@indya.com19 Mar 2001 00:00 
Mark Matthews19 Mar 2001 04:58 
Subject:Re: MySql Problem
From:Mark Matthews (mmat@thematthews.org)
Date:03/19/2001 04:58:28 AM
List:com.mysql.lists.java

According to your stacktrace, you're using the JDBC-ODBC bridge, not the MM.MySQL driver. First make sure that your code is actually using the MM.MySQL driver, then we can go on from there.

-Mark

I am using MYSql and Tom Cat.. mm.mysqlDriver.. Running from public static void main it runs fine... But when running from the Servlets this is the error shown

Unable to load driver. java.sql.SQLException: [TCX][MyODBC]Can't connect to MySQL server on 'localhost' (10061) at sun.jdbc.odbc.JdbcOdbc.createSQLException (JdbcOdbc.java:6031) at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6188) at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:2458) at sun.jdbc.odbc.JdbcOdbcConnection.initialize (JdbcOdbcConnection.java:320).....

My code is

Class.forName("org.gjt.mm.mysql.Driver").newInstance();

Connection C = DriverManager.getConnection ("jdbc:mysql://localhost:3306/test?user=nobody"); out.println("Connection Established"); Statement st = C.createStatement();

Enjoy being an Indyan at http://www.indya.com

To unsubscribe, send a message to the address shown in the List-Unsubscribe header of this message. If you cannot see it, e-mail java@lists.mysql.com instead.