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

[Updating to 18.0.5] 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 #21259

Closed
ImMaax opened this issue Jun 5, 2020 · 2 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug

Comments

@ImMaax
Copy link

ImMaax commented Jun 5, 2020

The error

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

Steps to reproduce

Run the web-based updater from version 18.0.4 to update to version 18.0.5.

Expected behaviour

No errors displayed, the updater running through the process of updating the instance and then redirecting me to the index page.

Server configuration

Web server: Apache/2.4.25
Database: MariaDB/10.1.44
PHP: 7.4.6
OS: Debian/9.12

@ImMaax ImMaax added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Jun 5, 2020
@kesselb
Copy link
Contributor

kesselb commented Jun 6, 2020

Thank you for reporting this issue 👍 Please check #15058 for more details.

Usually there are two ways to fix this:

A) Configure your database server to support utf8mb4 (https://docs.nextcloud.com/server/16/admin_manual/configuration_database/mysql_4byte_support.html).

B) If the database server does not support utf8mb4 disable it by setting 'mysql.utf8mb4' => false in your config.php (emojis in filename, calendar events, etc. are not possible than and you have to accept the warning).

@kesselb kesselb closed this as completed Jun 6, 2020
@ImMaax
Copy link
Author

ImMaax commented Jun 6, 2020

Thank you for reporting this issue 👍 Please check #15058 for more details.

Usually there are two ways to fix this:

A) Configure your database server to support utf8mb4 (https://docs.nextcloud.com/server/16/admin_manual/configuration_database/mysql_4byte_support.html).

B) If the database server does not support utf8mb4 disable it by setting 'mysql.utf8mb4' => false in your config.php (emojis in filename, calendar events, etc. are not possible than and you have to accept the warning).

Thanks, that fixed it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug
Projects
None yet
Development

No branches or pull requests

2 participants