1. Open eclipse and click Window-preferences-java-Build Path-User Libraries
2. Click the new button
3. Enter jdbc in the input box, select the System library below, click ok
4. Return to the previous interface, click Add External JARs, open to the directory where jdbc is stored, and open -ok
5. The next step is to import the jar package into the project, right-click on the project-Build Path-Configure Build Path
6. Click on the right side Add Library...-User Library-Next. Put a check mark and click finish
7. Return to the previous level interface and you will see the jdbc you added. Click Apply and then click OK.
8. In this way, you can see the imported jdbc under the project.
The above is the detailed content of How to connect eclipse to mysql. For more information, please follow other related articles on the PHP Chinese website!