MySQL: Specified key was too long; max key length is 767 bytes

Share this post:

I just ran into this issue while setting up a new client server with MySQL 5.6, well, Percona 5.6 in my case.

It looks like one has to explicitly allow long prefixes in 5.6. Something that was never needed in 5.5 or earlier version of MySQL.

In any case, adding:

innodb_large_prefix = on

to the my.cfn file solved it.

Hope it helps someone else out there 🙂

Over 10 years in business.

Self-funded. No investors. No bullshit.

More than 3,000 customers worldwide.

Helpmonks - no bullshit customer engagement service

Growth starts with action

Empower your team and delight your customers.

Helpmonks - email management for small businesses