解决ERROR 1071 (42000) : Specified key was too long; max key length is 767 bytes

  • 系统变量innodb_large_prefix为ON

  • 系统变量innodb_file_format为Barracuda

  • ROW_FORMAT为DYNAMIC或COMPRESSED

show variables like '%innodb_large_prefix%';//查看是否开启
set global innodb_large_prefix=on;//如果没有开启设置开启
show variables like '%innodb_file_format%';//查看file格式
 set global innodb_file_format=Barracuda;//设置格式
 set global innodb_file_format_max=Barracuda;//设置格式
row_format=DYNAMIC或COMPRESSED ;//设置格式
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容