Mysql Plus jdbc emoji Exception

  java, question

This is the problem that mysq supports emoji coding. I have already followed this article:Mysql/Java Server Support for emojiThe said method upgrades mysql and connector, but the problem has not been solved. I hope the experts can give me some advice.
Mysql version:5.6.21
Mysql-connectort version:5.1.30
Set the code:
图片描述

The problem now is that mysql client under the terminal can read and write emoji code:

图片描述

But in java reading is normal, writing exception:

Normal reading

图片描述

Write exception

图片描述

图片描述

Resolved

问题出在这里:jdbc:mysql://localhost:3306/dbtest?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&autoReconnect=true
Connector greater than 5.1.13 cannot be added with characterEncoding=utf8. Remove and ok.
Reference here:http://info.michael-simons.eu/2013/01/21/java-mysql-and-multi-byte-utf-8-support/

问题出在这里:jdbc:mysql://localhost:3306/dbtest?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&autoReconnect=true
Connector greater than 5.1.13 cannot be added with characterEncoding=utf8. Remove and ok.