> i'm [sic] trying to connect to a mysql database and i [sic] get this
> error:
>
> java.lang.ClassNotfoundException:com.mysql.jdbc.Driver
That is not the error you are getting. It isn't the exception you are
getting, either.
> I've downloaded the mysql driver called mysql-connector-java-5.1.6-bin
> and the driver directory is in the my CLASSPATH but still have the
> same exception. What should i do? Thank you
To nail this down, don't use the CLASSPATH envar. Use the -classpath (-cp)
option to the 'java' command. If you get it right there, then you might, if
you are into maintenance difficulties, modify your CLASSPATH to match.
How exactly are you attempting to run the program? Without knowing that it's
impossible to answer your question.

Signature
Lew
boyScout - 25 Apr 2008 09:16 GMT
I've tried to do what you suggested me but still it don't work, i'm
using easyphp and i was tring to connect to its mysql from a simple
java application to see how it will work, i've been using msaccess
database and i want to immigrate to mysql when i'm using java. And i
was tring for the first time to connect to mysql using java. However
i've placed the bin/ directory of java in the CLASSPATH but nothing,
same message.
Lew - 25 Apr 2008 12:39 GMT
> I've tried to do what you suggested me but still it don't work, i'm
> using easyphp and i was tring to connect to its mysql from a simple
[quoted text clipped - 3 lines]
> i've placed the bin/ directory of java in the CLASSPATH but nothing,
> same message.
The bin/ directory has *nothing* to do with the CLASSPATH. The bin/ directory
is for executables; classpaths are for Java libraries. Not even remotely the
same thing.
Read "Setting the Classpath"
<http://java.sun.com/javase/6/docs/technotes/tools/solaris/classpath.html>
<http://java.sun.com/javase/6/docs/technotes/tools/windows/classpath.html>

Signature
Lew
> and the driver directory is in the my CLASSPATH
Not the JAR file itself? You're supposed to put the JAR in your classpath.

Signature
Lew
> Hello guys, i'm trying to connect to a mysql database and i get this
> error:
[quoted text clipped - 4 lines]
> and the driver directory is in the my CLASSPATH but still have the
> same exception. What should i do? Thank you
What exactly is in your classpath ?
Arne