MySQL loads the JDBC driver and mysql loads the jdbc driver.

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.