[SOLVED] Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

database
update_problems

#1

ERROR MESSAGE:

An exception occurred while executing ‘ALTER TABLE [TABLE_NAME] 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

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


[SOLVED] 'Specified key was too long' when enabling MySQL 4-byte support in Nextcloud 14
#2

Hi, I found this video, it just help me https://www.youtube.com/watch?v=vPNU3fONY7c