If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > JAVA > What are the steps for connecting jdbc with mysql?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-18-09, 02:23
Mani-Vee Mani-Vee is offline
Registered User
 
Join Date: Feb 2009
Posts: 2
What are the steps for connecting jdbc with mysql?

I'M NOT ASKING ABOUT THE CODE. I just want to know what are and all the steps involved in the connection other than coding. I'm using j2sdk1.4.0, MySQL Server 4.1 and mysql-connector-java-3.0.17-ga. Am very new to this area.

Thanks in advance

Last edited by Mani-Vee; 02-18-09 at 03:24.
Reply With Quote
  #2 (permalink)  
Old 02-18-09, 03:11
healdem healdem is online now
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
assuming that
...your MySQl installation is working
...you have created suitable userid & passwords
...you have GRANTed suitable access
...you have downloaded a suitable JAVA ODBS driver
,all of which chold have happened at installation

probably best to ask this in the java forum, as its not actually a mySQL question its more of a Java question
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #3 (permalink)  
Old 02-18-09, 03:23
Mani-Vee Mani-Vee is offline
Registered User
 
Join Date: Feb 2009
Posts: 2
Hello healdem,

Actually the problem is with the connection. I have committed some mistake in the connection. While trying to execute my java program it gives a NoClassFoundException: com.mysql.jdbc.Driver.
Reply With Quote
  #4 (permalink)  
Old 02-18-09, 13:35
BettingSherlock BettingSherlock is offline
Registered User
 
Join Date: May 2007
Posts: 78
difficult to say without the code and installation details but basically Java cannot find mysql-connector-java-3.0.17-ga .

I have had some problems with this using Tomcat,
the documentation says the file can be part of the application but i have noticed this is not always the case. In order to get things working i have had to copy the file into Tomcat's lib directory.

In short, the most likely problem is that mysql-connector-java-3.0.17-ga cannot be found.
Reply With Quote
  #5 (permalink)  
Old 02-18-09, 14:30
healdem healdem is online now
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
so the problem is with the ODBC connector, again thats not a MySQL (server problem). belatedly you are telling us what the error message is.. I'd agree with BettingSherlock.. it sounds like the ODBC driver is banjaxed. reinstall the driver or see if there is a more recent driver available from the MySQL site.

and, in my judegement, you are more likely to get an answer on the Java forum rather than the MySQL forum
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On