MyEclipse Connection Mysql Database graphics and text tutorial _mysql

Source: Internet
Author: User

Self-taught Java EE courses, in doing some small things, need to connect the MySQL database, I read a book, and then find their own, step-by-step success, learning is a sharing process, graphic combination, hope to help more people.

First, configure the database Explorer1.

Open MyEclipse Database.

Method: Window-->openperspective-->myeclipse Database Explorer


2. Click on the top right corner of the myeclipse ... Right-click in the DB Browser space-->new open the database Driver



3. Fill in the contents in the Open database driver, explain what a form represents

Template: driver template, depending on the database used to select a different drive type, because we are connected to MySQL so we choose MySQL connector/j;
Driver Name: The names of the connections;
Connection URL: Sets the connection address. Figure User Name: typically the default root;
Password: The password for the database, the default is 123456;
Add jar: Add the Database jar package, download it yourself;
Driver ClassName: the system will automatically match;

4.

Test whether your database is connected successfully, as long as you follow the steps above, there should be no big problems. Open, as in Navicat.



Second, the database configuration, after the introduction of the project to add MySQL package can be.

Add the MySQL package in the project, follow the picture order, then click Next to create a new one, name it, and click OK. Add the jar package, import the MySQL package, and then click Ok,finish. is done.



Third, in the project to see whether to import jar packages, and then write a database of Java classes, you can use.


The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.

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.