IDEA running error: Could not find artifact mysql:mysql-connector-java:pom:unknown in central (https://repo.maven.apache.org/maven2)
Reason for error: Maven cannot find mysql
Solution: Due to IDEA dependency mysql before:
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
Modification: Specify your mysql version in the pom.xml file . Note: The mysql version here should be consistent with the local mysql version
<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.21</version> <scope>runtime</scope> </dependency>