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

SQL errror when updating to 13.0.5 #10449

Closed
jekil opened this issue Jul 30, 2018 · 4 comments
Closed

SQL errror when updating to 13.0.5 #10449

jekil opened this issue Jul 30, 2018 · 4 comments
Labels

Comments

@jekil
Copy link

jekil commented Jul 30, 2018

Steps to reproduce

  1. Install 13.0.4
  2. Upgrade to 13.0.5 via web updater

Expected behaviour

Successfull update

Actual behaviour

I got this error:
Checked for update of app "workflowengine" in appstore
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

Server configuration

Operating system: latest ubuntu lts

Web server: apache2

Database: mariadb

PHP version: 7.2

Nextcloud version: 13.0.4

Updated from an older Nextcloud/ownCloud or fresh install: 13.0.4 was fresh

Where did you install Nextcloud from: zip file (not deb)

List of activated apps:

App list
  - activity: 2.6.1
  - admin_audit: 1.3.0
  - calendar: 1.6.1
  - checksum: 0.4.0
  - comments: 1.3.0
  - contacts: 2.1.5
  - dav: 1.4.7
  - encryption: 2.0.0
  - federatedfilesharing: 1.3.1
  - federation: 1.3.0
  - files: 1.8.0
  - files_external: 1.4.1
  - files_frommail: 0.1.0
  - files_pdfviewer: 1.2.1
  - files_sharing: 1.5.0
  - files_texteditor: 2.5.1
  - files_trashbin: 1.3.0
  - files_versions: 1.6.0
  - files_videoplayer: 1.2.0
  - firstrunwizard: 2.2.1
  - gallery: 18.0.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.1.0
  - metadata: 0.6.0
  - nextcloud_announcements: 1.2.0
  - notifications: 2.1.2
  - oauth2: 1.1.1
  - onlyoffice: 1.3.0
  - password_policy: 1.3.0
  - provisioning_api: 1.3.0
  - serverinfo: 1.3.0
  - sharebymail: 1.3.0
  - survey_client: 1.1.0
  - systemtags: 1.3.0
  - theming: 1.4.5
  - twofactor_backupcodes: 1.2.3
  - twofactor_totp: 1.4.1
  - updatenotification: 1.3.0
  - workflowengine: 1.3.0

Nextcloud configuration:

Config report
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "xxxx.net"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/xxxx.net",
        "dbtype": "mysql",
        "version": "13.0.4.0",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mysql.utf8mb4": true,
        "maintenance": false,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\APCu",
        "updater.secret": "***REMOVED SENSITIVE VALUE***",
        "theme": "",
        "loglevel": 2
    }
}

Are you using external storage, if yes which one: no

Are you using encryption: yes

Are you using an external user-backend, if yes which one: no

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #10350 (13.0.5), #8107 (Error on Update from 12.0.4 to 12.0.5), #7960 (Updating Nextcloud 12.0.5 to 13.0.0.rc2 fails on Postgres ), #10373 (Internal server error following update from 13.0.4 to 13.0.5), and #8208 (Error when upgrading spreed from NC 12.0.5 to 13.0.0. - shared hosting).

@Snake883
Copy link

Snake883 commented Aug 4, 2018

Did you follow "Enabling MySQL 4-byte support"?
If you did, might it be the cause of the problem?

@Snake883
Copy link

Snake883 commented Aug 4, 2018

SOLUTION:

$ sudo mysql -u root -p
MariaDB [(none)]> use nextcloud;
MariaDB [nextcloud]> set global innodb_large_prefix=on;
MariaDB [nextcloud]> set global innodb_file_format=Barracuda;
$ sudo -u www-data php occ maintenance:repair

@jekil
Copy link
Author

jekil commented Aug 5, 2018

Yeah, I enabled MySQL 4-byte support.
As far as I can see, some tables still were in utf8, dunno why, I enabled MySQL 4-byte support from the beginning.
BTW your fix worked, thanks so much.

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

3 participants