Home >Database >Mysql Tutorial >How to solve the problem that the mysql driver jar package cannot be found

How to solve the problem that the mysql driver jar package cannot be found

藏色散人
藏色散人Original
2020-10-26 09:17:548091browse

The solution to the problem that the mysql driver jar package cannot be found: first search for Maven-related information in settings; then configure the downloaded Maven path and configuration file on the Maven page; finally click Apply application and click OK. Can.

How to solve the problem that the mysql driver jar package cannot be found

Recommended: "mysql tutorial"

Problem description: Mysql is configured in the project's pom.xml Dependency, when running the test class, an error message shows that the driver package of mysql cannot be found. It can be seen that the jar package of mysql is not loaded in maven.
The error is reported as shown below:
How to solve the problem that the mysql driver jar package cannot be found
Solution ideas and methods:
1. First search for maven-related information in settings: the displayed configuration is IDEA’s default maven
How to solve the problem that the mysql driver jar package cannot be found
1.1 General development requires you to manually configure the maven path and configuration file yourself:
1.1.1 Download the official address of maven: http://maven.apache.org/download.cgi
How to solve the problem that the mysql driver jar package cannot be found
1.1.2 Download and unzip it to the D drive
2. Then configure the maven path and configuration file just downloaded on the maven page
How to solve the problem that the mysql driver jar package cannot be found
3. Click in the lower right corner ApplyApply, then clickOK.
4. Reload the dependencies in the project. After loading, you will find that the jar packages with added dependencies will all be under External Libraries:
How to solve the problem that the mysql driver jar package cannot be found
The above problems were all encountered during the graduation design process. , record the problem after solving it to avoid recurrence.

The above is the detailed content of How to solve the problem that the mysql driver jar package cannot be found. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn