Connect To MySQL With JDBC Driver November 11, 2013 // by Krishna Srinivasan Here is an example to connect your JDBC code to MySQl database. You have to download mysql.jar for the JDBC driver class from here. If you are not copying the mysql.jar file in the classpath, you will get the following error.