[SOLVED] 'Specified key was too long' when enabling MySQL 4-byte support in Nextcloud 14

After a notification showed up in my Nextcloud (14) pointing me to enabling MySQL 4-byte support. I did a Snapshot of my System and followed the instructions including the additional steps for MariaDB (v 10.3 or later).

Everything worked fine until the php occ maintenance:repair step.
Before finishing, it threw the following errors:

In AbstractMySQLDriver.php line 115:
                                                                                   
  An exception occurred while executing 'ALTER TABLE `oc_addressbooks` CONVERT TO  
   CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;':                                    
                                                                                   
  SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too l  
  ong; max key length is 767 bytes                                                 
                                                                                   

In PDOStatement.php line 107:
                                                                                   
  SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too l  
  ong; max key length is 767 bytes                                                 
                                                                                   

In PDOStatement.php line 105:
                                                                                   
  SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too l  
  ong; max key length is 767 bytes

Maintenance mode is still active. Can someone tell me, what this means and how i can resolve it?

Ahh sorry, i missed a forum topic presenting the solution:

1 Like