Error : Specified key was too long; max key length is 1000 bytes
Error : Specified key was too long; max key length is 1000 bytes
刚解决完类似的问题,整理一下思路。
1.DB引擎是MyIsAm
2. 字符集是utf8,1个utf8 = 3bytes
3.最后就是(100 + 255)* 3> 1000所以报错
解决方案很多,修改DB engine至innodb,或者是更改字符集,或者是减小字段长度皆可。
:)
如:修改数据库引擎可解决:
ENGINE=InnoDB DEFAULT CHARSET=utf8;
Create TABLE XXL_JOB_QRTZ_JOB_DETAILS
(
SCHED_NAME VARCHAR(120) NOT NULL,
JOB_NAME VARCHAR(200) NOT NULL,
JOB_GROUP VARCHAR(200) NOT NULL,
DESCRIPTION VARCHAR(250) NULL,
JOB_CLASS_NAME VARCHAR(250) NOT NULL,
IS_DURABLE VARCHAR(1) NOT NULL,
IS_NONCONCURRENT VARCHAR(1) NOT NULL,
IS_Update_DATA VARCHAR(1) NOT NULL,
REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
JOB_DATA BLOB NULL,
PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
)ENGINE=InnoDB DEFAULT CHARSET=utf8;