sql - MySQL error: key specification without a key length - Stack Overflow
You should define which leading portion of a TEXT column you want to index. InnoDB has a limitation of 768 bytes per index key and you won't be able to create an index longer than that. This will work fine: CREATE TABLE t_length (mydata TEXT NOT NULL, KEY...