This page has moved or been replaced. The new page is located here:

Please update any bookmarks that point to the old page.

Download this Manual
User Comments
  Posted by Matt Ludlum on August 13, 2007
For JDK releases, I found a way to get it working by placing the .jar into the %insertPathToJava%/jre/lib/ext/. I tried this with 1.6.0u2 on XP and the program began compiling, without the class path workaround.
  Posted by Richard B on September 9, 2007
Copying the connector jar into your Java installation does work, but is not ideal because it will probably break if you install a java update (since that installs a whole new VM).

If you don't want to mess around with CLASSPATH, you could always include the code directly with your application; the 'unjar' Ant task is useful for this. Create a target which unjars library classes into your build tree before your jar/war target, and you'll be all done.
  Posted by Pierre Morin on May 25, 2008
For Mac OS X, it seems that copying the MySQL driver .jar file into /Library/Java/Extensions is the only thing to do.
  Posted by William Arens on January 5, 2010
What finally worked for me, I was trying to get OpenOffice to connect to MySQL DB, was to place a symbolic link in the jre1.6.0_17/lib/ext/ directory.

On Linux, untar or unzip, mysql-connector-java-5.0.X any where on the system, I used /usr/java. I then created a symbolic link 'ln -s /usr/java/mysql-connector-java-5.0.8/mysql-connector-java-5.0.8-bin.jar /usr/java/latest/lib/ext/'. Once OpenOffice was pointed to the currect version of java, everything worked.

The trick for me was learning about the extensions directory. In this case /usr/java/jre1.6.0_17/lib/ext/.
  Posted by Jim Winter on January 28, 2010
For Mac OS X, I was getting 'Driver not suitable' exception. I've noticed the extracted jar file permissions were set to 655 and should be 755 which has fixed the problem for me.
  Posted by Gregoy Jones on May 21, 2013
In addition to altering the CLASSPATH if you are using Windows 7 or above during the installation of the JConnnector to MySQL, insure the UNBLOCK button at the bottom of the properties dialog box is clicked while coping the correct path for ue. Find the file, then copy and paste it's location during this process locate the Advance button underneath lies the UNBLOCK button. By default the file usage is blocked due to the security elements involved. It will state "this file is from another computer" therefore it's in a blocked state after installation. The .jar file and the MySQL JConnector file are in this state. This will cause the code or functions not to return the desired response if not unblocked.
  Posted by Abuzar Anis on July 1, 2014
I faced the same issue .
For me, I first checked nmap localhost and mysql is open there.
Hence I copied the jdbc driver(mysql-connector-java-5.1.31-bin) in /usr/java/latest/jre/lib/ext/

It worked for me.
Sign Up Login You must be logged in to post a comment.