Quantcast
Channel: MySQL Forums - Connector/J, JDBC and Java
Viewing all articles
Browse latest Browse all 884

JDBC Driver error (no replies)

$
0
0
When I type mysql at the command prompt I get:

access denied for user odbc@localhost using password: NO


Also, I keep getting "JDBC Driver error" when I run the code below:

public class test {
public static void main(String[] args) {
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
//Class.forName("org.gjt.mm.mysql.Driver").newInstance();
System.out.println("Good to go");
} catch (Exception E) {
System.out.println("JDBC Driver error");
}
}
}

I am running XP Pro and the mysql-connector-java-5.1.21-bin.jar file is in
C:\Program Files\MySQL\mysql-connector-java-5.1.21

My classpath is this:
C:\Program Files\MySQL\mysql-connector-java-5.1.21\mysql-connector-java-5.1.21-bin.jar

These problems began just a few days ago.
Any help would be appreciated.

Viewing all articles
Browse latest Browse all 884

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>