linux下mysql innodb 新建表提示超出最大索引 :
Index column size too large. The maximum column size is 767 bytes.
Specified key was too long; max key length is 767 bytes
解决:
innodb_file_format=barracuda
innodb_file_per_table=true
innodb_large_prefix=true
然后在建表时指定row format 格式为 Dynamic 或者 Compressed
参考:
DYNAMIC and COMPRESSED Row Formats:https://dev.mysql.com/doc/refman/5.6/en/innodb-row-format-dynamic.html
https://help.aliyun.com/knowledge_detail/41707.html
网友评论