Deploy the MySQLJDBC driver in Eclipse in Ubuntu

Source: Internet
Author: User
1. MySQLJDBC driver package: dev. mysql. comdownloadsconnectorj version: mysql-connector-java-5.1.17.zip2. After downloading

1. MySQL JDBC driver package: http://dev.mysql.com/downloads/connector/j/ version: mysql-connector-java-5.1.17.zip 2. Download

1. MySQL JDBC driver package:

Version: mysql-connector-java-5.1.17.zip

2. Download any directory decompress to/mysql-connector-java-5.1.17/mysql-connector-java-5.1.17-bin.jar;

/Mysql-connector-java-5.1.17/directory also has docs and src folder, src folder has lib directory;

3. Prerequisites: the mysql and eclipse environments have been installed. refer to the previous blog article on installing the j2ee environment and mysql In Ubuntu;

4. Open eclispe, go to the menu windows-> prefrences, go to Java-> Build Path-> user libraries, select new, name mysql, Path:/mysql-connector-java-5.1.17/mysql-connector-java-5.1.17-bin.jar;

5. Create a java project named mysqlcon, right-click it, select Build Path-> Add libraries, select user library from the list, and select the mysql installation package deployed above in the next interface;

6. for development, create a new class under the mysqlcon project, name it my, and set the package to cn, that is, the java file of cn. my:

VALUES (?,?)}

Displayed and inserted correctly!

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.