<property name="connectionInitSqls" value="set names utf8mb4;" />
useUnicode=true&&allowMultiQueries=true&autoReconnect=true&charset=utf8mb4
my.ini
[client]
default-character-set = utf8mb4
[mysql]
default-character-set = utf8mb4
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
init_connect='SET NAMES utf8mb4'
ALTER DATABASE 数据库名 CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
alter table 表名 convert to character set utf8mb4 collate utf8mb4_bin;