search

Home  >  Q&A  >  body text

IntelliJ cannot resolve dependency: mysql-connector-java

<p>I ran into an issue where IntelliJ did not recognize the mysql-connector dependency in my pom.xml file. It shows up in red and says "Dependency 'mysql:mysql-connector-java:8.0.25' not found". I don't need to download anything, right? Is it enough to just declare dependencies in pom.xml? I had the same problem with maven-failsafe-plugin. </p> <p>My pom.xml file dependencies are as follows:</p> <pre class="brush:php;toolbar:false;"><dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.25</version> <scope>compile</scope> </dependency></pre> <p>If anyone has any suggestions it would be greatly appreciated. </p>
P粉238433862P粉238433862488 days ago653

reply all(1)I'll reply

  • P粉883223328

    P粉8832233282023-08-26 00:06:40

    I think they made a change recently in terms of relying on MySQL. My problem was solved by adding the following dependencies. You can also try it

    <dependency>
    <groupId>com.mysql</groupId>
    <artifactId>mysql-connector-j</artifactId>
    </dependency>

    reply
    0
  • Cancelreply