MySQL, JDBC usage  
Author Message
unbending





PostPosted: 2004-9-16 21:37:00 Top

java-programmer, MySQL, JDBC usage Excuse me for the simple question, but I'm new to Java and its
environment. I haven't found all the information I was looking for, or
at least it wasn't complete. Here's what I'm trying to do:
1) Setup MySQL database on OpenBSD. Done.
2) Make simple Java test program (on WinXP) to connect to the
database. Not complete, but I seem to be going in the right direction.
3) Setup the JDBC connection. Trouble here.

That isn't necessarily the order in which I did things, just a list.
I've found examples on how to program using MySQL's JDBC driver, so
that should be OK. I haven't found enough info on what JDBC and its
drivers do or what environment they need. For example, does MySQL's
driver need J2EE on the database server machine to work properly? Or
does it need something like an Apache/Tomcat combination? Does it need
anything Java related on the server machine?

It seems that OpenBSD isn't well supported by the latest Java
environments (only 1.3 and back work). Is there any way to access the
MySQL database from a Java program without needing a Java environment
on the server?

Thanks.
 
kjc





PostPosted: 2004-9-16 22:49:00 Top

java-programmer >> MySQL, JDBC usage There does'nt have to be anyting Java related on the server box.
Why not just get the latest release of java from sun.com and
the latest release of the MySQL JDBC driver and install it on OpenBSD.

email***@***.com wrote:
> Excuse me for the simple question, but I'm new to Java and its
> environment. I haven't found all the information I was looking for, or
> at least it wasn't complete. Here's what I'm trying to do:
> 1) Setup MySQL database on OpenBSD. Done.
> 2) Make simple Java test program (on WinXP) to connect to the
> database. Not complete, but I seem to be going in the right direction.
> 3) Setup the JDBC connection. Trouble here.
>
> That isn't necessarily the order in which I did things, just a list.
> I've found examples on how to program using MySQL's JDBC driver, so
> that should be OK. I haven't found enough info on what JDBC and its
> drivers do or what environment they need. For example, does MySQL's
> driver need J2EE on the database server machine to work properly? Or
> does it need something like an Apache/Tomcat combination? Does it need
> anything Java related on the server machine?
>
> It seems that OpenBSD isn't well supported by the latest Java
> environments (only 1.3 and back work). Is there any way to access the
> MySQL database from a Java program without needing a Java environment
> on the server?
>
> Thanks.

 
Dieter Bender





PostPosted: 2004-9-17 1:48:00 Top

java-programmer >> MySQL, JDBC usage Hi,

there is a problem with the newest MySQL Driver and java 1.3 on the client
box. Read the MySql Connect Doku about requirements (some -X parameter at
startup of your java program) or use an older driver.

Dieter

email***@***.com wrote:

> Excuse me for the simple question, but I'm new to Java and its
> environment. I haven't found all the information I was looking for, or
> at least it wasn't complete. Here's what I'm trying to do:
> 1) Setup MySQL database on OpenBSD. Done.
> 2) Make simple Java test program (on WinXP) to connect to the
> database. Not complete, but I seem to be going in the right direction.
> 3) Setup the JDBC connection. Trouble here.
>
> That isn't necessarily the order in which I did things, just a list.
> I've found examples on how to program using MySQL's JDBC driver, so
> that should be OK. I haven't found enough info on what JDBC and its
> drivers do or what environment they need. For example, does MySQL's
> driver need J2EE on the database server machine to work properly? Or
> does it need something like an Apache/Tomcat combination? Does it need
> anything Java related on the server machine?
>
> It seems that OpenBSD isn't well supported by the latest Java
> environments (only 1.3 and back work). Is there any way to access the
> MySQL database from a Java program without needing a Java environment
> on the server?
>
> Thanks.

 
 
unbending





PostPosted: 2004-9-17 4:16:00 Top

java-programmer >> MySQL, JDBC usage kjc <email***@***.com> wrote in message news:<wJh2d.2145$email***@***.com>...
> There does'nt have to be anyting Java related on the server box.
> Why not just get the latest release of java from sun.com and
> the latest release of the MySQL JDBC driver and install it on OpenBSD.

I've tried simply installing the Linux version of the J2SDK and J2EE,
but they wouldn't extract properly. The OBSD ports won't let me
install 1.4.1 because it doesn't work and 1.4.2 isn't in there yet.
MySQL is installed on OBSD, but I wasn't sure what I had to do in the
way of Java to get JDBC working.

If there doesn't have to be anything Java related on the server
machine, I'm guessing I don't have to do anything extra (besides set
up MySQL server) to get all this to work.
 
 
unbending





PostPosted: 2004-9-17 10:16:00 Top

java-programmer >> MySQL, JDBC usage Dieter Bender <email***@***.com> wrote in message news:<email***@***.com>...
> Hi,
>
> there is a problem with the newest MySQL Driver and java 1.3 on the client
> box. Read the MySql Connect Doku about requirements (some -X parameter at
> startup of your java program) or use an older driver.


Thanks for the tip, but I wasn't planning on using 1.3 on the client
side (just MAYBE on the server side). I couldn't find exactly what you
were referring to (the problem that is). I checked this documentation:
<http://dev.mysql.com/doc/connector/j/en/>

Could you please be more specific about where it is?
TIA
 
 
Dieter Bender





PostPosted: 2004-9-17 14:52:00 Top

java-programmer >> MySQL, JDBC usage Hi,

the server doesn't need java to connect with jdbc, on the client side,you
have some java requirements:
http://dev.mysql.com/doc/connector/j/en/#id2424002
not all VMs have an option to turn the verifier off and then you need 1.4 or
better.

mfg

Dieter

email***@***.com wrote:

> Dieter Bender <email***@***.com> wrote in message
> news:<email***@***.com>...
>> Hi,
>>
>> there is a problem with the newest MySQL Driver and java 1.3 on the
>> client box. Read the MySql Connect Doku about requirements (some -X
>> parameter at startup of your java program) or use an older driver.
>
>
> Thanks for the tip, but I wasn't planning on using 1.3 on the client
> side (just MAYBE on the server side). I couldn't find exactly what you
> were referring to (the problem that is). I checked this documentation:
> <http://dev.mysql.com/doc/connector/j/en/>
>
> Could you please be more specific about where it is?
> TIA

 
 
unbending





PostPosted: 2004-9-17 22:24:00 Top

java-programmer >> MySQL, JDBC usage Dieter Bender <email***@***.com> wrote in message news:<email***@***.com>...
> Hi,
>
> the server doesn't need java to connect with jdbc, on the client side,you
> have some java requirements:
> http://dev.mysql.com/doc/connector/j/en/#id2424002
> not all VMs have an option to turn the verifier off and then you need 1.4 or
> better.


OK, I see it. Thanks. Although, the MySQL documentation seems to imply
that you need to turn off the verifier only for the older versions to
get it to work. It should work fine using 1.4+ without turning off the
verifier, correct?
 
 
Dieter Bender





PostPosted: 2004-9-17 22:53:00 Top

java-programmer >> MySQL, JDBC usage Hi,

yes, it does work without any problems for 1.4+ . I've used it to access
MySql from an as400.

Dieter

email***@***.com wrote:

> Dieter Bender <email***@***.com> wrote in message
> news:<email***@***.com>...
>> Hi,
>>
>> the server doesn't need java to connect with jdbc, on the client side,you
>> have some java requirements:
>> http://dev.mysql.com/doc/connector/j/en/#id2424002
>> not all VMs have an option to turn the verifier off and then you need 1.4
>> or better.
>
>
> OK, I see it. Thanks. Although, the MySQL documentation seems to imply
> that you need to turn off the verifier only for the older versions to
> get it to work. It should work fine using 1.4+ without turning off the
> verifier, correct?

 
 
unbending





PostPosted: 2004-9-18 5:20:00 Top

java-programmer >> MySQL, JDBC usage Does this setup only work with the DriverManager type connection, or
can I use the DataSource type connection?
 
 
Dieter Bender





PostPosted: 2004-9-18 16:04:00 Top

java-programmer >> MySQL, JDBC usage Hi,

I#ve used DriverManager, but I don't se a reason for a DataSource not
working.

Dieter

email***@***.com wrote:

> Does this setup only work with the DriverManager type connection, or
> can I use the DataSource type connection?