SQL Syntax Error bei Upgrade

Hallo,
ich wollte mein Nextcloud von 15.0.10.0 auf 16.0.5 upgraden, leider kommt ein SQL Fehler dabei.

Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE `oc_mimetypes` 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 1000 bytes

Nach bisschen googeln bin ich auf einige Befehle gestoßen, die bei mir jedoch alles nix bringen.
In der SQL Datenbank habe ich schon folgendes ausgeführt:

set global innodb_large_prefix=on;
set global innodb_file_format=Barracuda;

Das hat leider aber auch keinen erfolg gebracht.

mysql> show variables like 'innodb_file_format';
+--------------------+-----------+
| Variable_name      | Value     |
+--------------------+-----------+
| innodb_file_format | Barracuda |
+--------------------+-----------+
1 row in set (0.00 sec)

mysql> show variables like 'innodb_file_format';
+--------------------+-----------+
| Variable_name      | Value     |
+--------------------+-----------+
| innodb_file_format | Barracuda |
+--------------------+-----------+
1 row in set (0.00 sec)

Das ändern des Characterset scheint auch geklappt zu haben:

 mysql> ALTER DATABASE c2wolke CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
 Query OK, 1 row affected (0.02 sec)

Nach den Befehlen habe ich die mysql Datenbank auch neugestartet.

sudo -u web13 php occ config:system:set mysql.utf8mb4 --type boolean --value=“true” bringt mir folgende Meldung:

Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
System config value mysql.utf8mb4 set to boolean true

jedoch ein sudo -u web13 php occ maintenance:repair bringt folgendes.

Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
 - Repair MySQL collation
 - Change row format for oc_mimetypes ...
 - Change collation for oc_mimetypes ...

In AbstractMySQLDriver.php line 125:

  An exception occurred while executing 'ALTER TABLE `oc_mimetypes` 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 1000 bytes


In PDOStatement.php line 143:

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


In PDOStatement.php line 141:

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


maintenance:repair [--include-expensive]

ein sudo -u web13 php occ upgrade bringt mir auch wieder diesen Fehler.

Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE `oc_mimetypes` 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 1000 bytes
Update failed

Langsam weis ich nun auch nicht mehr weiter, was ich noch machen kann. Hat jemand eine Idee?

  • Server-Typ: MySQL
  • Server-Version: 5.7.27-0ubuntu0.18.04.1 - (Ubuntu)
  • Protokoll-Version: 10

VG
Lindi

mhhh niemand eine Idee?
Die Installation hängt durch den Fehler aktuell in der schwebe zwischen utf8 und utf8mb4_general_ci Tabellen.
Man kann sich zwar einloggen, aber ich bekomme halt keine Updates mehr hin.

Einige Tabellen sind nicht im InnoDB Format sondern MyISAM. Du musst den Tabellen Typ ändern, da du vermutlich dein Owncloud/Nextcloud genauso lange von Version zu Version geupdatet hast wie ich.

Lösung findet sich bei stackexchange