com.mysql.cj.jdbc.Driver problem and IDEA import jar package

java problem fix

1. com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

  • The cause of the error and the method of modification:
  1. It is because the back-end MySQL version is 8.0 and higher, which is driven before MySQL8.0 com.mysql.jdbc.Driver, and can be changed after 8.0 com.mysql.cj.jdbc.Driver;
  2. If the error of Communications link failure is still reported, you can modify jdbc tojdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone = GMT

2. IntelliJ IDEA import jar package

  1. First download the jar package (mybatis), click Project Structure
    Insert picture description here2. Find Dependencies, click "+"
    Insert picture description here3. Select JARS or directories
    Insert picture description here4. Find the Jar package path, and select the application.
    Insert picture description hereas the picture shows:
    Insert picture description here

Guess you like

Origin blog.csdn.net/jiaona_chen123/article/details/114153169
Recommended