Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to setup mysql connector j to work in linux

Kenneth Owino
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. I have a problem setting up mysql connector j so I can access my mysql database in linux. I already downloaded mysql-connector-java-5.1.15.tar.gz, extracted its contents and copied mysql-connector-java-5.1.15-bin.jar to /usr/lib/jvm/java-6-sun/ext/ but when i run my code I still get the error message below:

CONCEPT:Unable to Load Driver
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(
at LoadDriver1.main(
SQLException: No suitable driver found for jdbc:mysql://localhost/mysql?user=userid&password=password
SQLState: 08001
VendorError: 0

Some help on how to go over this is very much welcome.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic