错误
Unknown initial character set index 255 received from server. Initial client character set can be forced via the characterEncoding property.
原因:
导包版本低于mysql中的版本(8.0)
解决办法
(1)修改url属性:
原:jdbc:mysql://localhost:3306/test
修改后:jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf8"
(2)更换导包的版本