JDBC连接MySQL8.0异常:com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

这里写图片描述

错误原因:使用rSet.getstring();前一定要加上rSet.next();

这里写图片描述

改正:在前面加上rSet.next();
这里写图片描述

猜你喜欢

转载自blog.csdn.net/weixin_42870683/article/details/81781607