This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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: 30076
    
149

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