Mario,

import java.sql.*;

// Only need to do this once when the program starts
try {
   Class.forName("org.gjt.mm.mysql.Driver").newInstance();
} catch (Exception DriverEx) {
}
try {
    String dbc="jdbc:mysql://mysql.server.net/databasename";
    String dbu="databaseuser";
    String dbp="password";
    java.sql.Connection con = DriverManager.getConnection(dbc,dbu,dbp);

    //Do My Stuff Here

} catch (SQLException SQLEx) {
}

Download the driver for gjt driver for Linux.  If you have trouble 
compiling it, I'll post mine. (I can't now, I'm in Windows and the 
driver's on the other partition.

Good luck!!

James

[EMAIL PROTECTED] wrote:

> I'd like to use MySql with Java (under Linux) bu I can't be able to do that: 
> how can I do?
> Thank you in advance, Mario.
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 
> 
> 


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to