Problem with Enabling MySQL 4-byte support

i have to Enable MySQL 4-byte support.
i follow this documentation:

and in step 5 say this error:
mysql> ALTER DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ERROR 1 (HY000): Can’t create/write to file ‘./nextcloud/db.opt’ (Errcode: 2)

how can i solve it?
thanks.

sorry my database is db-cloud. but now says this:

mysql> ALTER DATABASE db-cloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘-cloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci’ at line 1

Hello,
it seems the minus sign in your database name produces problems.
Try:

ALTER DATABASE `db-cloud` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

i use :

mysql> USE db-cloud;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> ALTER DATABASE CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci
-> ;
Query OK, 1 row affected (0.00 sec)

but when i use this fail:

php occ maintenance:repair

www-data@de194ff64df7:~/html$ php occ maintenance:repair
Nextcloud is in maintenance mode - no apps have been loaded

  • 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 106:

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 119:

SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was t
oo long; max key length is 767 bytes

In PDOStatement.php line 117:

SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was t
oo long; max key length is 767 bytes

i solved it adding:
[mysqld]
innodb_large_prefix=true
innodb_file_format=barracuda
innodb_file_per_table=1

but now i don’t see thumbs:

image

thumbs of imagen appear but thumbs of folders no. :frowning:

any idea @tuxedo-rb?

Sorry, not really.
It’s probably more an cache/css problem (serversided or browser).
Did you check your nextcloud.log?

only i can see in logs are:

“PROPFIND /remote.php/dav/files/nayrine/Documents HTTP/1.1” 207 6937 “-” “Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36”

now i can see:

stat: cannot stat ‘/var/www/html/data/appdata_oc9dq5y2g9e5/theming/0/icon-core-filetypes_package-x-generic.svg’: No such file or directory

its possible that after upgrade of nextcloud this file dissapear?
how can i restore it?

thanks

but this error appear suddently not inmediatly. and not a lot.

if i do an inspect in browser appear this:

You could try to do an file scan.

cd /var/www/html
sudo -u www-data php occ files:scan --all

Usually this fixes outdated/orphaned file links.

Edit:
Hmm, sorry the mentioned command rescans only all user specific files and wont help.

but the problem is not with my files. is witg icons of nextcloud. folders, icons of pdf… etc…