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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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: 29287
    
140

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
 
Similar Threads
Jars and magic problems
new to jdbc
where to place jdbc jar for mysql
id of the new field in my table
why i can't get the whole string when rs.getString() called ?