MySQL connection problem
I'm using NetBean IDE 5.5 and and I want to connect to MySQL database at my computer but it can't get connected
I already download the MySql connector from MySql web and it still cant proceed. Could someone show me how to do it properly, thank you in advance
the code:
String url = "jdbc:mysql://localhost:3306/abcd_ss";
String username = "unite";
String password = "unite";
Connection connection;
try{
Class.forName("com.mysql.jdbc.Driver");
connection = DriverManager.getConnection(url, username, password );
}
catch ( ClassNotFoundException cnfex ) {
System.err.println(
"Failed to load JDBC/ODBC driver." );
cnfex.printStackTrace();
// System.exit( 1 ); // terminate program
}
catch ( SQLException sqlex ) {
System.err.println( "Unable to connect" );
sqlex.printStackTrace();
}
the error :
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

