Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 13.0.5 Error: Specified key was too long #10535

Closed
Snake883 opened this issue Aug 4, 2018 · 5 comments
Closed

Update 13.0.5 Error: Specified key was too long #10535

Snake883 opened this issue Aug 4, 2018 · 5 comments
Labels

Comments

@Snake883
Copy link

Snake883 commented Aug 4, 2018

Doctrine\DBAL\Exception\DriverException: 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

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #10350 (13.0.5), #4846 (During update: Specified key was too long), #9056 (Installation Error - Specified key was too long; max key length is 1000 bytes), #10449 (SQL errror when updating to 13.0.5), and #9815 (No update 13.0.3 possible).

@Snake883
Copy link
Author

Snake883 commented Aug 4, 2018

I did follow:
https://docs.nextcloud.com/server/11/admin_manual/maintenance/mysql_4byte_support.html#mariadb-support

It's listed as "This is even more experimental." Perhaps part of the problem?

@kevkha
Copy link

kevkha commented Aug 5, 2018

I observer the same issue upgrade from 13.0.4 to 13.0.5 on DietPi.

Doctrine\DBAL\Exception\DriverException: 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

Any work around for this issue? Currently, UI stock at Start Upgrade screen. Thanks in advance.

Update: @snakyjake1 I found your solution from #10449 and I applied it on DietPi like so

root@DietPi:/# sudo mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 10142
Server version: 10.0.35-MariaDB-0+deb8u1 (Raspbian)

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> set global innodb_large_prefix=on;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> set global innodb_file_format=Barracuda;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> exit;

Then Start upgrade again and it passed. Thanks so much! Cheers!

@brainchild0
Copy link

I am running from a shared Maria cluster. I only have permissions to change settings within the particular database in the cluster, not global variables. I currently experience this issue and cannot apply the suggested resolution. The above implies the shared case is not supported, but naturally, such support is preferable from a feature standpoint. I am not aware of whether Nextcloud expressly supports shared hosting, but I have understood that this kind of deployment has an active user base.

@kesselb
Copy link
Contributor

kesselb commented May 7, 2019

Thank you for reporting this issue 🎉

See this issue for more information #15058

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants