问题描述
创建数据库的时候,主键指定长度导致错误。
#1089 - Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys
解决方法
修改 PRIMARY KEY (`id`(10))
为 PRIMARY KEY (`id`)
即可。
因为主键不能指定索引长度。