MySQL loads the JDBC driver and mysql loads the jdbc driver.
First, install the MySQL database. MySQL5.5 is installed. The installation steps are not described here. Please note that if the installation process stops at the start service and cannot continue, please refer to my blog post "when installing MySQL5.5, the start service does not respond, solution", it should help you solve the problem.
Next, go to MySQL Official Website. This is an image file. Double-click it to automatically install the file and generate a MySQL Connector J folder in the C: \ Program Files \ MySQL folder. Go to the folder and find a file named mysql-connector-java-5.1.35-bin.jar.
My java program is installed in the D: \ Java \ jdk1.7.0 _ 15 folder, find the lib folder under the folder, and copy the mysql-connector-java-5.1.35-bin.jar to lib. When the java Program is installed, a lib folder is generated in C: \ Program Files \ Java \ jre by default. in this folder, locate ext and double-click to enter the folder, at the same time, copy a copy of The mysql-connector-java-5.1.35-bin.jar into it.
In Eclipse, right-click the project, right-click Build Path, and select Configure Build Path. An Attribute diagram is displayed. Select Libraries under Java Build Path, click Add External JARs, browse to the JDBC MySQL driver jar package, and click OK to import it to the project.
After completing the preceding steps, you can use java to operate the MySQL database.