Search code examples
neoscms

Neos 4.0.x setup fails


While installing neos it throws this exception:

An exception occurred while executing 'CREATE TABLE flow3_resource_resourcepointer (hash VARCHAR(255) NOT NULL, PRIMARY KEY(hash)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB':
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

The exception details have been logged to the Flow system log.
Exception in line 184 of /Users/julius/Documents/dev/neos/Packages/Libraries/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php: An exception occurred while executing 'CREATE TABLE flow3_resource_resourcepointer (hash VARCHAR(255) NOT NULL, PRIMARY KEY(hash)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB':

SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes - See also: 201805011913565a6e91.txt

Exception Code  1355480641
Exception Type  Neos\Flow\Core\Booting\Exception\SubProcessException
Log Reference   20180501191355663ebf
Thrown in File  Packages/Framework/Neos.Flow/Classes/Core/Booting/Scripts.php
Line    677

Solution

  • With Neos 4.0 the default charset and collation was changed to utf8mb4 which requires longer keys and therefore requires at least MySQL 5.7.x or MariaDB 10.2.x. I assume you try to install Neos 4.0 on an older database version.