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

Hibernate - HibernateException: createQuery is not valid without active transaction