|
|
How to connect to a remote MySQL database using Java
Hi,
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.
Thank you,
Best,
Madhura
|
|
0
|
|
|
|
Reply
|
madhura
|
12/15/2007 2:26:56 AM |
|
madhura wrote on 15.12.2007 03:26:
> Hi,
>
> 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
|
|
0
|
|
|
|
Reply
|
Thomas
|
12/15/2007 8:19:01 AM
|
|
Thomas Kellerer wrote:
>
>
> madhura wrote on 15.12.2007 03:26:
>> Hi,
>>
>> 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
T
Madhura - take note that you're aiming for the wrong driver. You want
com.mysql.jdbc.Driver.
--
Lew
|
|
0
|
|
|
|
Reply
|
Lew
|
12/15/2007 5:56:53 PM
|
|
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
|
|
0
|
|
|
|
Reply
|
UTF
|
12/15/2007 6:23:17 PM
|
|
Lew wrote on 15.12.2007 18:56:
> Thomas Kellerer wrote:
>>
>>
>> madhura wrote on 15.12.2007 03:26:
>>> Hi,
>>>
>>> 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
> T
>
> Madhura - take note that you're aiming for the wrong driver. You want
> com.mysql.jdbc.Driver.
Which is well documented in the manual
|
|
0
|
|
|
|
Reply
|
Thomas
|
12/15/2007 7:04:26 PM
|
|
|
4 Replies
665 Views
(page loaded in 0.059 seconds)
|
|
|
|
|
|
|
|
|