MySQL5.6建索引时遇到 Specified key was too long; max key length is 767 bytes错误提示解决办法
解决方法
-
// 查看
-
show variables like "innodb_large_prefix";
-
show variables like "innodb_file_format";
-
//修改最大索引长度限制
-
set global innodb_large_prefix=1; 或 set global innodb_large_prefix=on;
-
set global innodb_file_format=BARRACUDA;