CREATE TABLE `keyvalue` ( `key` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin, `createTime` datetime NOT NULL, `updateTme` datetime NOT NULL, PRIMARY KEY (`key`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
我们只要把key设置为utf8mb4并且排序设置为utf8mb4_bin即可!