I see a number of references to this topic but after trying some of the resolutions still have the same problem. I am getting an error
No suitable driver
SQLState: 08001
VendorError: 0
When trying to test my jdbc connector setup.
I have set my environment path to include the jar file: mysql-connector-java-3.1.10-bin.jar
I have also added the same jar file to my java build path in MyEclipse.
In addition I added that same jar file to the drivers in MyEclipse Database Explorer.
This is the code I am running:
package com.mysql;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class TestConnection {
public TestConnection() {
super();
String url = “jdbc:mysql://localhost:3306/mysql”;
try {
Connection conn = DriverManager.getConnection(url, “root”, “system”);
System.out.println(“url: ” + url);
System.out.println(“conn: ” + conn);
conn.close();
} catch (SQLException ex) {
System.out.println(“SQLException: ” + ex.getMessage());
System.out.println(“SQLState: ” + ex.getSQLState());
System.out.println(“VendorError: ” + ex.getErrorCode());
}
}
But I am assuming I’m still missing something in the setup, just can’t figure out where.
Any help is greatly appreciated.