Server: [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

Created on 5 Jun 2020  路  2Comments  路  Source: nextcloud/server

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

0. Needs triage bug

Most helpful comment

Thank you for reporting this issue :+1: Please check https://github.com/nextcloud/server/issues/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).

All 2 comments

Thank you for reporting this issue :+1: Please check https://github.com/nextcloud/server/issues/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).

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!

Was this page helpful?
0 / 5 - 0 ratings