-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
DB error while updating 16.0.3 to 16.0.4 #16783
Comments
#15974 does not fix my problem. I have root access to the server so have tried the various suggestions but still have the problem. I have tried to repair the database as suggested but this fails (see below). My instance is not stuck in maintenance mode until I can figure this out! root@ubuntu:/var/www/owncloud# sudo -u www-data php occ maintenance:repair
In AbstractMySQLDriver.php line 125: An exception occurred while executing 'ALTER TABLE SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was t In PDOStatement.php line 143: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was t In PDOStatement.php line 141: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was t maintenance:repair [--include-expensive] root@ubuntu:/var/www/owncloud# |
There are two ways: 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 |
Thanks kesselb, disabling utf8mb4 in config.php solved the problem. Many thanks for your prompt support - it is REALLY appreciated :-) |
Steps to reproduce
Expected behaviour
Successful upgrade
Actual behaviour
DB error:
Update to 16.0.4
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###Detailed logs below.
Configuration:
Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-54-generic x86_64)
MariaDB: Server version: 10.1.40-MariaDB-0ubuntu0.18.04.1 - Ubuntu 18.04
Apache/2.4.29 (Ubuntu)
Database client version: libmysql - mysqlnd 5.0.12-dev - 20150407 - $Id: PHP version: 7.2.21-1+ubuntu18.04.1+deb.sury.org+1
Detailed logs
Update to 16.0.4
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 bytesDetailed logs
Preparing update
Set log level to debug
Turned on maintenance mode
Repair step: Repair MySQL collation
Repair info: Change row format for oc_addressbooks ...
Repair info: Change collation for oc_addressbooks ...
Repair info: Change row format for oc_authtoken ...
Repair info: Change collation for oc_authtoken ...
Repair info: Change row format for oc_calendarobjects ...
Repair info: Change collation for oc_calendarobjects ...
Repair info: Change row format for oc_calendars ...
Repair info: Change collation for oc_calendars ...
Repair info: Change row format for oc_calendarsubscriptions ...
Repair info: Change collation for oc_calendarsubscriptions ...
Repair info: Change row format for oc_dav_shares ...
Repair info: Change collation for oc_dav_shares ...
Repair info: Change row format for oc_login_flow_v2 ...
Repair info: Change collation for oc_login_flow_v2 ...
Repair info: Change row format for oc_migrations ...
Repair info: Change collation for oc_migrations ...
Repair info: Change row format for oc_mimetypes ...
Repair info: Change collation for oc_mimetypes ...
Repair info: Change row format for oc_systemtag_group ...
Repair info: Change collation for oc_systemtag_group ...
Repair info: Change row format for oc_trusted_servers ...
Repair info: Change collation for oc_trusted_servers ...
Repair step: Repair SQLite autoincrement
Repair step: Copy data from accounts table when migrating from ownCloud
Repair step: Drop account terms table when migrating from ownCloud
Updating database schema
Updated database
Checking for update of app "accessibility" in appstore
Checked for update of app "accessibility" in appstore
Checking for update of app "activity" in appstore
Checked for update of app "activity" in appstore
Checking for update of app "bruteforcesettings" in appstore
Checked for update of app "bruteforcesettings" in appstore
Checking for update of app "calendar" in appstore
Checked for update of app "calendar" in appstore
Checking for update of app "cloud_federation_api" in appstore
Checked for update of app "cloud_federation_api" in appstore
Checking for update of app "comments" in appstore
Checked for update of app "comments" in appstore
Checking for update of app "contacts" in appstore
Checked for update of app "contacts" in appstore
Checking for update of app "dav" in appstore
Checked for update of app "dav" in appstore
Checking for update of app "encryption" in appstore
Checked for update of app "encryption" in appstore
Checking for update of app "federatedfilesharing" in appstore
Checked for update of app "federatedfilesharing" in appstore
Checking for update of app "federation" in appstore
Checked for update of app "federation" in appstore
Checking for update of app "files" in appstore
Checked for update of app "files" in appstore
Checking for update of app "files_external" in appstore
Checked for update of app "files_external" in appstore
Checking for update of app "files_markdown" in appstore
Checked for update of app "files_markdown" in appstore
Checking for update of app "files_pdfviewer" in appstore
Checked for update of app "files_pdfviewer" in appstore
Checking for update of app "files_rightclick" in appstore
Checked for update of app "files_rightclick" in appstore
Checking for update of app "files_sharing" in appstore
Checked for update of app "files_sharing" in appstore
Checking for update of app "files_texteditor" in appstore
Checked for update of app "files_texteditor" in appstore
Checking for update of app "files_trashbin" in appstore
Checked for update of app "files_trashbin" in appstore
Checking for update of app "files_versions" in appstore
Checked for update of app "files_versions" in appstore
Checking for update of app "files_videoplayer" in appstore
Checked for update of app "files_videoplayer" in appstore
Checking for update of app "firstrunwizard" in appstore
Checked for update of app "firstrunwizard" in appstore
Checking for update of app "gallery" in appstore
Checked for update of app "gallery" in appstore
Checking for update of app "logreader" in appstore
Checked for update of app "logreader" in appstore
Checking for update of app "lookup_server_connector" in appstore
Checked for update of app "lookup_server_connector" in appstore
Checking for update of app "nextcloud_announcements" in appstore
Checked for update of app "nextcloud_announcements" in appstore
Checking for update of app "notes" in appstore
Checked for update of app "notes" in appstore
Checking for update of app "notifications" in appstore
Checked for update of app "notifications" in appstore
Checking for update of app "oauth2" in appstore
Checked for update of app "oauth2" in appstore
Checking for update of app "onlyoffice" in appstore
Checked for update of app "onlyoffice" in appstore
Checking for update of app "password_policy" in appstore
Checked for update of app "password_policy" in appstore
Checking for update of app "privacy" in appstore
Checked for update of app "privacy" in appstore
Checking for update of app "provisioning_api" in appstore
Checked for update of app "provisioning_api" in appstore
Checking for update of app "qownnotesapi" in appstore
Checked for update of app "qownnotesapi" in appstore
Checking for update of app "recommendations" in appstore
Checked for update of app "recommendations" in appstore
Checking for update of app "serverinfo" in appstore
Checked for update of app "serverinfo" in appstore
Checking for update of app "sharebymail" in appstore
Checked for update of app "sharebymail" in appstore
Checking for update of app "support" in appstore
Checked for update of app "support" in appstore
Checking for update of app "survey_client" in appstore
Checked for update of app "survey_client" in appstore
Checking for update of app "systemtags" in appstore
Checked for update of app "systemtags" in appstore
Checking for update of app "tasks" in appstore
Checked for update of app "tasks" in appstore
Checking for update of app "theming" in appstore
Checked for update of app "theming" in appstore
Checking for update of app "twofactor_backupcodes" in appstore
Checked for update of app "twofactor_backupcodes" in appstore
Checking for update of app "updatenotification" in appstore
Checked for update of app "updatenotification" in appstore
Checking for update of app "viewer" in appstore
Checked for update of app "viewer" in appstore
Checking for update of app "workflowengine" in appstore
Checked for update of app "workflowengine" in appstore
Repair step: Repair MySQL collation
Repair info: Change row format for oc_addressbooks ...
Repair info: Change collation for oc_addressbooks ...
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 bytesThe update was unsuccessful. Please report this issue to the Nextcloud community.
Checked for update of app "provisioning_api" in appstore
Checking for update of app "qownnotesapi" in appstore
Checked for update of app "qownnotesapi" in appstore
Checking for update of app "recommendations" in appstore
Checked for update of app "recommendations" in appstore
Checking for update of app "serverinfo" in appstore
Checked for update of app "serverinfo" in appstore
Checking for update of app "sharebymail" in appstore
Checked for update of app "sharebymail" in appstore
Checking for update of app "support" in appstore
Checked for update of app "support" in appstore
Checking for update of app "survey_client" in appstore
Checked for update of app "survey_client" in appstore
Checking for update of app "systemtags" in appstore
Checked for update of app "systemtags" in appstore
Checking for update of app "tasks" in appstore
The text was updated successfully, but these errors were encountered: