vvong
April 5, 2019, 6:54am
1
The upgrade is done smoothly. As usual, I check the NC backend and follow all advices recommended. This time, it includes enabling emojis.
I follow this link till the last line.
https://docs.nextcloud.com/server/15/admin_manual/configuration_database/mysql_4byte_support.html
and receive the following error message
$ sudo -u www-data php occ maintenance:repair
Repair MySQL collation
Change row format for oc_accounts …
Change collation for oc_accounts …
Change row format for oc_activity …
Change collation for oc_activity …
Change row format for oc_activity_mq …
Change collation for oc_activity_mq …
Change row format for oc_addressbookchanges …
Change collation for oc_addressbookchanges …
Change row format for oc_addressbooks …
Change collation for oc_addressbooks …
In AbstractMySQLDriver.php line 115:
An exception occurred while executing ‘ALTER TABLE oc_addressbooks
CONVER
T TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;’:
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was t
oo long; max key length is 767 bytes
In PDOStatement.php line 107:
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was t
oo long; max key length is 767 bytes
In PDOStatement.php line 105:
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was t
oo long; max key length is 767 bytes
maintenance:repair [–include-expensive]
I tried
$ sudo -u www-data php occ maintenance:repair --include-expensive
but seems it is making the situation worse.
My NC is now in maintenance mode.
I read but do not follow to lines in php file when I don’t understand what they are. Please advise what should I do now.
Thanks a lot for your help.
My LAMP is
Ubuntu 18.04.2 LTS (Bionic Beaver)
Apache2 2.4.29-1ubuntu4.5
Mariadb 1:10.1.38-0ubuntu0.18.04.1
php7.2 7.2.15-0ubuntu0.18.04.2
dev0
April 5, 2019, 9:55am
2
ah yes, I had that recently during my DB migration.
You need to add the following settings in:
50-server.cfg
in the section [mysql] add:
innodb_large_prefix=on
innodb_file_format=barracuda
innodb_file_per_table=1
# innodb-accelerators
innodb_buffer_pool_size = 512M
innodb_log_buffer_size = 32M
innodb_max_dirty_pages_pct = 90
innodb_default_row_format=dynamic
restart mariadb,
then it should work again.
2 Likes
vvong
April 5, 2019, 10:19am
3
Thanks a lot. It works instantly.