Nextcloud version: 14.0.0.19
Operating system and version: Ubuntu 18.04.1
Apache version: 2.4.29
PHP version: 7.2
The issue you are facing:
Followed the notice that 14.0.1 was available and applied the upgrade via the web updater. The update ended with an error and I cannot get the server running again.
Tried to reinstall 14.0.0, but that generated the same error, while the server was running fine before. Even restored the backup from last night, but that did not help either.
With reference to the error (see below): 4-Byte support for MySQL was enabled since April of this year and gave no problems earlier.
Is this the first time youāve seen this error?: Yes
Steps to replicate it: sudo -u www-data php occ upgrade
The output of your Nextcloud log in:
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE oc_authtoken ADD private_key LONGTEXT DEFAULT NULL, ADD public_key LONGTEXT DEFAULT NULL, ADD version SMALLINT UNSIGNED DEFAULT 1 NOT NULL':
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
Update failed
The output of your config.php file in /path/to/nextcloud
:
<?php
$CONFIG = array (
'instanceid' => 'xxxxxxxxxxxx',
'passwordsalt' => 'xxxxxxxxxxxxxxxxxxxxxxxx',
'secret' => 'xxxxxxxxxxxxxxxxx',
'trusted_domains' =>
array (
0 => 'cloud-server',
1 => '192.168.1.4',
2 => 'xxxxxxxx',
3 => 'xxxxxxxxx',
),
'datadirectory' => '/var/lib/nextcloud/data',
'overwrite.cli.url' => 'https://xxxxxxxxx',
'htaccess.RewriteBase' => '/',
'dbtype' => 'mysql',
'mysql.utf8mb4' => true,
'version' => '13.0.6.1',
'dbname' => 'ocdb',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'xxxx',
'dbpassword' => 'xxxxxx',
'theme' => '',
'trashbin_retention_obligation' => 'auto, 30',
'versions_retention_obligation' => 'auto',
'mail_smtpmode' => 'smtp',
'mail_from_address' => 'xxxxx',
'mail_domain' => 'xxxxxl',
'mail_smtphost' => 'xxxxxx',
'mail_smtpport' => '587',
'mail_smtpsecure' => 'tls',
'mail_smtpauth' => 1,
'mail_smtpauthtype' => 'PLAIN',
'mail_smtpname' => 'xxxxxxx',
'mail_smtppassword' => 'xxxxxxx',
'memcache.local' => '\\OC\\Memcache\\APCu',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'localhost',
'port' => 6379,
),
'installed' => true,
'loglevel' => 2,
'updatechecker' => true,
'updater.release.channel' => 'stable',
'maintenance' => true,
);
The output of your Apache log: Since server is not running, no relevant log messages appear.