'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.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source