Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Testing MySQL Connector/J

 
Swapna Gouri Kalanidhi
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
I have installed MySQL and MySQL Connector J on my system. How to test whether MySQL connector J has been installed properly or not...

I'm trying this command on the command prompt:

mysqld-nt --console

but getting following error:
081119 16:24:07 InnoDB: Operating system error number 32 in a file operation.
InnoDB: The error means that another program is using InnoDB's files.
InnoDB: This might be a backup or antivirus software or another instance
InnoDB: of MySQL. Please close it to get rid of this error.

Please kindly help...!
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only "installation" required for the JDBC driver is that the jar file be put in your application's classpath. If the application connects to the database then the driver is "installed" correctly. If you get a ClassNotFoundException then it isn't.
 
Swapna Gouri Kalanidhi
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul
As you have said, I'm getting an exception...What should I do now? I have updated the class path but still I'm facing this problem. Can you suggest what should be done to get this to work...
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are two steps.

1. Find the jar file which contains the JDBC driver. Make sure it actually contains the JDBC driver.

2. Put that jar file somewhere and make sure it is part of the classpath for your application. Bear in mind that different kinds of application configure their classpaths differently.

There's plenty of tutorials for setting Java classpaths, if you are just writing a command line application.
 
Swapna Gouri Kalanidhi
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul
Thanks a bunch....I got it

Its working fine now!!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic