> 1071 - Specified key was too long; max key length is 767 bytes

mysql

1071 - Specified key was too long; max key length is 767 bytes

原因: 字符宽度问题。 我用的utf-8 mb4

查看变量 show variables like 'innodb_large_prefix';

开关是关的。

打开:SET @@global.innodb_large_prefix=ON;
或者 : set global innodb_large_prefix=on

再看下确认一下。
> 1071 - Specified key was too long; max key length is 767 bytes

然后再执行sql

上一篇:[LeetCode] 1961. Check If String Is a Prefix of Array


下一篇:实现在点击asp:button按钮后,不刷新当前页面