MySQL: Error 1071 Specified key was too long max key length is 1000 bytes

Problem:

(...)
KEY `value` (`value`(250)) 

) ENGINE=MyISAM;

Error Code: 1071. Specified key was too long; max key length is 1000 bytes

Solution:

KEY `value` (`value`(250))
-- ) ENGINE=MyISAM;
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


alternatively:

set global innodb_large_prefix = ON;

Comments

Popular posts from this blog

Oracle - duplicate fields in RECORD,TABLE or argument list are not permitted

Oracle - ORA-29282: invalid file ID, ORA-06512: at "SYS.UTL_FILE"