MySQL5.6建索引时遇到 Specified key was too long; max key length is 767 bytes错误提示解决办法

发布时间 2023-11-28 17:02:59作者: 爱吐泡泡的小小鱼

解决方法

  1. // 查看
  2. show variables like "innodb_large_prefix";
  3. show variables like "innodb_file_format";
  4.  //修改最大索引长度限制
  5.  set global innodb_large_prefix=1; 或   set global innodb_large_prefix=on;
  6. set global innodb_file_format=BARRACUDA;