最开始版本会这样连接
Class.forName(“com.mysql.jdbc.Driver”);
Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/atest,“root”,“password”);
现在版本
Class.forName(“com.mysql.cj.jdbc.Driver”);
Connection con=DriverManager.getConnection(“jdbc:mysql://localhost:3306/atest?useSSL=false&serverTimezone=UTC”,“root”,“password”);