Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ Dependency not found: mysql-connector-java

I am having an issue in which IntelliJ is not recognising the mysql-connector dependency in my pom.xml file. It appears as red and displays 'Dependency 'mysql:mysql-connector-java:8.0.25' not found'. I don't have to download anything, do I? Is declaring the dependency in pom.xml enough? I am also getting the same for the maven-failsafe-plugin.

My pom.xml file dependency:

<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>8.0.25</version>
    <scope>compile</scope>
</dependency>

If anyone has any suggestions, they would be greatly appreciated.

like image 592
JohnSA Avatar asked Nov 17 '25 09:11

JohnSA


1 Answers

I think they have recently changed in dependency MySQL. My issue was resolved by adding the below dependency.You can also try it

<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
</dependency>
like image 168
Kamal chaudhari Avatar answered Nov 19 '25 00:11

Kamal chaudhari



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!