Re: How to connect to a remote MySQL database using Java
- From: Arne Vajhøj <arne@xxxxxxxxxx>
- Date: Sat, 15 Dec 2007 13:23:17 -0500
Lew wrote:
Thomas Kellerer wrote:madhura wrote on 15.12.2007 03:26:I am trying to connect to a remote MySQL database using Java. I used
the driver org.gjt.mm.mysql.Driver but it doesn't seem to help. I
would appreciate if anybody could guide me through this as I am
learning programming.
http://dev.mysql.com/doc/refman/5.0/en/connector-j-usagenotes-basic.html
Madhura - take note that you're aiming for the wrong driver. You want com.mysql.jdbc.Driver.
org.gjt.mm.mysql.Driver was the original MySQL JDBC driver developed
by Mark Matthews in 1998.
In 2002 he joined MySQL and the driver became the basis for
the official MySQL JDBC driver.
A lot of documentation still refer to the old driver name.
And it still works - even new distributions from MySQL
has:
package org.gjt.mm.mysql;
import java.sql.SQLException;
public class Driver extends com.mysql.jdbc.Driver {
public Driver() throws SQLException {
super();
}
}
I think using com.mysql.jdbc.Driver would be the nicest
code (after all then MySQL may someday remove that old
name), but functionally there will not be a difference.
Arne
.
- References:
- How to connect to a remote MySQL database using Java
- From: madhura
- Re: How to connect to a remote MySQL database using Java
- From: Thomas Kellerer
- Re: How to connect to a remote MySQL database using Java
- From: Lew
- How to connect to a remote MySQL database using Java
- Prev by Date: Re: How to connect to a remote MySQL database using Java
- Next by Date: Re: How to connect to a remote MySQL database using Java
- Previous by thread: Re: How to connect to a remote MySQL database using Java
- Next by thread: Re: How to connect to a remote MySQL database using Java
- Index(es):
Relevant Pages
|