Nextcloud: maximum column size is 767 bytes
I am running a Nextcloud installation on Openmediavault. When upgrading from version 15 on 16 there were errors when adjusting the MySQL / MariaDB. Especially with the Contacts CardDav app. The prefix length of 760 bytes was reached, because innodb-large-prefix was not activated. The error message in detail:
Nextcloud: maximum column size is 767 bytes
After a little research, the solution was quickly found. However, I have diversewp-admin / admin.php?I saw page = dsgvoaio-free-settings-pageene approaches and with some I was not quite there. In the end, I decided on the following approach, since it requires little intervention in the system, is conveniently controlled via a conf and no complex SQL statements are necessary.
As can be seen from previous articles, I run Nextcloud with a MySQL / MariaDB database on Openmediavault. How to make a database, here in particular for Wallabag, set up, I describe it under the following link: Wallabag on Openmediavault
We simply adapt two cnf files for this. Two of these configuration files can be found on Openmediavault, once for MySQL and once for MariaDB. First the MariaDB
/etc/mysql/mariadb.conf.d/50-server.cnf
/etc/mysql/mariadb.conf.d/50-server.cnf # this is read by the standalone daemon and embedded servers [server] # this is only for the mysqld standalone daemon [mysqld] max_connections=500 interactive_timeout=60 innodb_large_prefix=on innodb_file_format=barracuda innodb_file_per_table=true wait_timeout=60
After that we set the option for MySQL
/etc/mysql/conf.d/mysql.cnf
/etc/mysql/conf.d/mysql.cnf wp-admin/admin.php?page=dsgvoaio-free-settings-page [mysqld] max_connections=500 interactive_timeout=60 innodb_large_prefix=on innodb_file_format=barracuda innodb_file_per_table=true wait_timeout=60
The three main options are:
innodb_large_prefix=on
innodb_file_format=barracuda
innodb_file_per_table=true
Please restart the database afterwards.
service mysql restart
Then you could continue with the upgrade or perform a repair.
sudo -u www-data php occ maintenance:repair
The OCC is in your Nextcloud directory. So please adjust the path accordingly. You should now see the error message Nextcloud: maximum column sizeno longer received.
Nextcloud can be downloaded for free here https://nextcloud.com/install/#