aspose file tools*
The moose likes JDBC and the fly likes jdbc connection with mysql on unix Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "jdbc connection with mysql on unix" Watch "jdbc connection with mysql on unix" New topic
Author

jdbc connection with mysql on unix

minal silimkar
Ranch Hand

Joined: Nov 25, 2007
Posts: 133
I want to connect jdbc with mysql on unix.
How will I do that?


Minal Silimkar
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Do you have a specific issue that we can help with?
minal silimkar
Ranch Hand

Joined: Nov 25, 2007
Posts: 133
I installed MySql with RedHat installation.
I want to check database connectivity with MySql.

I tried following code for database connectivity



it is giving error as below

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver not found in [file:/usr/share/java/libgcj-3.4.2.jar, file:./, core:/]
at java.net.URLClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.5.0.0)
at gnu.gcj.runtime.VMClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.5.0.0)
at java.lang.ClassLoader.loadClass(java.lang.String, boolean) (/usr/lib/libgcj.so.5.0.0)
at _Jv_FindClass(_Jv_Utf8Const, java.lang.ClassLoader) (/usr/lib/libgcj.so.5.0.0)
at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.5.0.0)
at java.lang.Class.forName(java.lang.String) (/usr/lib/libgcj.so.5.0.0)
at JdbcConnection.main(java.lang.String[]) (Unknown Source)
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30506
    
150

Minal,
Can you show the classpath where you set it to include mysql?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jdbc connection with mysql on unix