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

Known Error

An error "Specified key was too long" can be displayed when running the database migration. This can happen with older versions of MySQL or MariaDB. The complete error may read SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes.

Solution

Configure the index lengths to support the utf8mb4 character set.

Was this article helpful?

comments powered by Disqus
Still need help?
October Forum

Community members share experiences, ask questions and exchange tips.

Discord

Talk with other October CMS developers in real time.

Custom Development

Hire the October CMS team to work on your website.

Contact Us

For bug reports and help with this website. See the roadmap or submit an idea on the Portal.