Symptoms
When you create an index, the system may report the following error:
ERROR 1709 (HY000): Index column size too large. The maximum column size is 767 bytes.
Causes
The maximum indexed field length allowed by the InnoDB storage engine is 767 bytes.
If you create an index on a multi-byte field or multiple fields, this error may be
reported.
Note For example, utf8mb4 is a four-byte character set. The default indexed field length
allowed by the utf8mb4 character set is 191 characters based on the following formula:
767 bytes/4 bytes per character ≈ 191 characters. If you create an index on a field
of the varchar (255) or char (255) type, the index creation fails. For more information,
see the MySQL documentation at the official MySQL website.