MySQL error: Specified key was too long; max key length is 1000 bytes
PHP applications during installation or upgrades may produce the following MySQL error:
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytesWhen a MySQL table uses the MyISAM storage engine, indexes cannot exceed 1000 bytes.
Solution
Section titled “Solution”Switch the affected table(s) to InnoDB, which supports larger index sizes. Avoid creating indexes on TEXT columns such as LONGTEXT and MEDIUMTEXT, as they carry significant overhead.