com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException exception solution

Reason : The version of mysql database is too high, and the version of mysql-java referenced by the project is too low.

First select version() to check your own mysql version, because I have newly installed sql and the project is the previous one. I just need to reintroduce the 8.0.31 jar package into the project.
Insert image description here

Reference: When you need to automatically download the jar package:
https://blog.csdn.net/hahaqinyou/article/details/125713317

Guess you like

Origin blog.csdn.net/rainAndyou/article/details/127750828