Graphic tutorial on connecting MyEclipse to MySQL database, myeclipsemysql

Source: Internet
Author: User

Graphic tutorial on connecting MyEclipse to MySQL database, myeclipsemysql

When I learned the JavaEE course by myself, I needed to connect to the MySQL database when I was doing some small things. I looked at the book myself and found myself. Step by step, the learning process was also a sharing process, hope to help more people.

1. Configure Database assumer1.

Open MyEclipse Database.

Method:Window --> Openperspective --> MyEclipse Database Explorer


2. Click MyEclipse... in the upper right corner and right-click the blank area of DB Browser --> new to open the DataBase Driver.



3. Enter the content in the opened DataBase Driver and explain what the table represents.

Template:Driver template: select different driver types based on the database in use. Because we connect to MySQL, we select MySQL Connector/J;
Driver name:Connection name;
Connection URL:Set the connection address. In the figure, User name:It is generally the default root;
Password:Database Password. The default value is 123456;
Add Jar:Add the database jar package and download it by yourself;
Driver classname:The system will automatically match;

4.

Test whether your database is connected successfully. If you follow these steps, no major problems will occur. It is the same as it is in navicat.



2. After the DataBase is configured, import and add the mysql package in the project.

Add a mysql package to the project, operate in the image order, click next, create a new package, name it, and click OK. Add the jar package, import the mysql package, and click OK and finish. That's all.



3. Check whether to import the jar package in the project and write a database java class.


The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

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.