要点如下:将要区分大小写的字段上直接设置如下内容
CHARACTER SET utf8mb4 COLLATE utf8mb4_bin 字段设置为区分大小写、
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for chentest
-- ----------------------------
DROP TABLE IF EXISTS `chentest`;
CREATE TABLE `chentest` (
`id` int(0) NOT NULL AUTO_INCREMENT,
`name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of chentest
-- ----------------------------
INSERT INTO `chentest` VALUES (1, 'chen');
INSERT INTO `chentest` VALUES (2, 'CHen');
INSERT INTO `chentest` VALUES (3, 'ChEN');
SET FOREIGN_KEY_CHECKS = 1;