出错原因
mysql版本大于cnnector版本
报错内容
Exception in thread "main" com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
解决方法
String url = "jdbc:mysql://localhost:3306/jdbcstudy?useUnicode=true&characterEncoding=utf8&useSSL=true";
将上述代码中useSSL=true 改为useSSL=false