David542 :
I have run into an error in trying to import a mysql dump:
[ERROR in query 369] Specified key was too long; max key length is 767 bytes
Is there a simple way to find which query this is referring to so I can diagnose it? Otherwise I need to find which is the 369th query and then investigate that and whether I have an error in the index statement or if it's a version issue. What would be the best way to go about finding which query this is referring to?
slaakso :
The problem comes from an index creation into an InnoDB-table which has a limit of 767 bytes per index. So, you have an index on a column / columns with combined length greater than 767 bytes.
If you use utf8mb4, a single column with width > 191 (4×191) characters will cause this. Most common cause would be an index on a varchar(255) column.