First install the MySQL database, I installed the MySQL5.5, the specific installation steps are not described here. It should be noted that if the installation process has been stopped at the start service and cannot continue, please refer to my post, "When installing MySQL5.5, the start service is not responding, the solution" should be able to help you solve the problem.
next go to MySQL official website http://dev.mysql.com/downloads/connector/j/Download the latest MySQL driver, What I'm downloading here is: Mysql-connector-java-gpl-5.1.35.msi. This is the image file, the double-click installs automatically and generates a MySQL Connector J folder under the C:\Program Files\mysql folder. Go to this folder to find a file called Mysql-connector-java-5.1.35-bin.jar.
My Java program is installed in the D:\Java\jdk1.7.0_15 folder, locate the Lib folder under that folder, and copy the Mysql-connector-java-5.1.35-bin.jar to Lib. Due to the installation of Java program, will default in C:\Program Files\java\jre a Lib folder, go to the folder to find Ext, double-click into the folder, while the Mysql-connector-java-5.1.35-bin.jar copies a copy into it.
in Eclipse, the mouse selects project engineering, right click on build path, select Configure build path, will jump out of a property block diagram. Select Libraries under Java Build path, click Add External JARs, Browse to the JDBC MySQL-driven jar package, click OK, and import it into the project.
By completing the above steps, you will be able to manipulate the MySQL database through Java.
MySQL load JDBC Driver