Getting problem while fixing the emoji problem on database

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2): 16.0.0
Operating system and version (eg, Ubuntu 17.04): Debian 9.9
Apache or nginx version (eg, Apache 2.4.25): nginx/1.10.3
PHP version (eg, 7.1): 7.3

The issue you are facing:

Hey, Basically I was following this guide to enable the mysql 4-byte support.

Is this the first time you’ve seen this error? (Y/N):Y

When I executed the command to repair the database
sudo -u www-data php occ maintenance:repair
This is the output

 - Repair MySQL collation
     - Change row format for oc_addressbooks ...
     - Change collation for oc_addressbooks ...

In AbstractMySQLDriver.php line 125:

  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 long; max key length is 767 bytes


In PDOStatement.php line 143:

  SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes


In PDOStatement.php line 141:

  SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes


maintenance:repair [--include-expensive]

Nextcloud is still working just fine. What should I do to fix this?
Thanks,
Miguel de Carvalho

1 Like

Just to say, that I am in the same situation. Have you found a solution in the meantime?

This will fix the problem :grin:. Helping while updating to nextcloud 16.0.1