Why do I see a MySQL error message saying “The maximum column size is 767 bytes”?

When you run a command to create a MySQL database table, you might see an error message saying “Error 1709: Index column size too large. The maximum column size is 767 bytes”.

This happens if you create a ROW_FORMAT=COMPRESSED table with utf8 encoding; it makes the table’s row too large.

You can avoid this problem by using ROW_FORMAT=DYNAMIC for that table instead.