MySQL创建表出现 Specified key was too long; max key length is 767 bytes
1、首先要登录mysql,进入mysql的路径,采用cmd,在cmd中输入mysql -u root -p;
如果不登录,执行下面过程会报错ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privilege(s) for this operation
2、启用innodb_large_prefix,那么限制值会增加到3072,开启如下:
mysql> set global innodb_file_format = BARRACUDA;
Query OK, 0 rows affected (0.00 sec)
mysql> set global innodb_large_prefix = ON;
Query OK, 0 rows affected (0.00 sec)