While connecting to MySQL database I do following steps
Connection con = null; Resultset rs = null; Statement st = null; Class.forName(\"com.mysql.jdbc.Drive
It will create a new instance of the com.mysql.jdbc.Driver class and hence call the static initialization which will register the driver with the DriverManager so you can create mysql connections based on the URL you use in the second line.
com.mysql.jdbc.Driver
DriverManager
The class however should be in the mysql.jar.
mysql.jar