Install MySQL and Navicat, and connect to MyEclipse, navicatmyeclipse
1. Download and install MySQL
1) Go to http://dev.mysql.com/downloads/download the mysqlcommunity edition serverand the ororused for jdbc. You can install MySQL by default. Remember the username and password of the MySQL database.
2) install it in C: \ Program Files \ MySQL or C: \ Program Files (x86) \ MySQL by default, the driver package required to connect to MyEclipse is under the MySQL Connector J directory of this directory, called mysql-connector-java-5.1.31-bin.jar.
2. Download and install Navicat
1) download Navicat for MySQL from http://www.navicat.com.cn/download. you can try it for 30 days. You can also download the cracked version.
2) Open Navicat, click connection> new connection, and enter a custom connection name. the user name and password are the user name and password used to install MySQL. You do not need to change the password. Click OK.
3) double-click the new connection to open the connection, which turns green. You can right-click to create a database and enter the database name to click OK. Double-click the database to open it. Then you can create a table.
3. Establish a connection between MySQL and MyEclipse
Reference http://jingyan.baidu.com/article/4e5b3e196758ad91901e24a0.html
Step 1 open the Database
Figure 1
Open myeclipse and click "window". Click "MyEclipse Database Explorer" in the "Open Perspective" menu to enter the page (figure 2)
Step 2 create a connection
Figure 2
Right-click new in the blank space or click the shortcut key in the menu bar (the triangle symbol below in figure 2) to create a new one. The Database Driver menu is displayed (Figure 3)
Step 3 select the connection mode
Figure 3
Select MySql Connector/j in the Driver template option box, as shown in figure 4.
Step 4 fill in configuration information
Figure 4
In
Driver name: enter the name of the Linked database (this can be set by your preferences. It is recommended that the name of the Linked database be related to the name of the project to be used)
The Connection URL is used to enter the address of the mysql database to be connected (jdbc: mysql: //
User name: Enter the database username. mysql defaults to root.
Enter the Password you set when accessing the mysql database. For example, figure 5
Figure 5
Step 5 add a driver
Figure 6
Click Add JARs to Add the driver file for myeclipse to connect to the mysql database. (It is best to store the driver file in an English directory. Make sure that the mysql database has been opened during the test. Otherwise, the test will not succeed ), the mysql-connector-java-5.1.7-bin version (which can be searched and downloaded online) is added here, as shown in figure 7
Step 6: test whether the data configuration is correct
Figure 7
Click Test Driver to Test whether the configuration is successful and enter the database access password. For example, figure 8
Figure 8
Step 7 test successful
Figure 9
Test the connection to the mysql database. Click Finish to create the connection.
Eighth week connect to the database
Figure 10
Right-click the connection you created and click Open another connection and enter the mysql database password to view the created database table. Figure 11 and Figure 12
Figure 11
Figure 12
Navicat for MySQL help
Myeclipse is an editor. What is the relationship between myeclipse and mysql ???
How to Use myeclipse to connect to MYSQL
Switch to the data source explorer view in eclipse, and right-click database connections,
Create a new connection,
Select the database type you want to connect to, and proceed step by step as prompted.
In the middle of the process, you will be prompted to add the driver, that is, the jdbc jar package, etc. Just go to the website and find the corresponding driver package.
Eclipse only integrates such plug-ins. It is not very convenient to use. It is best to use client software,
For example, mysqlFront and navicat9_mysql_cs have many such software.