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.