Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / September 2004

Tip: Looking for answers? Try searching our database.

MySQL, JDBC usage

Thread view: 
unbending@hushmail.com - 16 Sep 2004 14:37 GMT
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 - 16 Sep 2004 15:49 GMT
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.

> 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
[quoted text clipped - 18 lines]
>
> Thanks.
unbending@hushmail.com - 16 Sep 2004 21:16 GMT
> 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.
Dieter Bender - 16 Sep 2004 18:48 GMT
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

> 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
[quoted text clipped - 18 lines]
>
> Thanks.
unbending@hushmail.com - 17 Sep 2004 03:16 GMT
> 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 - 17 Sep 2004 07:51 GMT
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

>> Hi,
>>
[quoted text clipped - 9 lines]
> Could you please be more specific about where it is?
> TIA
unbending@hushmail.com - 17 Sep 2004 15:23 GMT
> Hi,
>
[quoted text clipped - 3 lines]
> 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 - 17 Sep 2004 15:53 GMT
Hi,

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

Dieter

>> Hi,
>>
[quoted text clipped - 8 lines]
> get it to work. It should work fine using 1.4+ without turning off the
> verifier, correct?
unbending@hushmail.com - 17 Sep 2004 22:20 GMT
Does this setup only work with the DriverManager type connection, or
can I use the DataSource type connection?
Dieter Bender - 18 Sep 2004 09:04 GMT
Hi,

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

Dieter

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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.