Cannot fix warning for MySQL 4-byte support

Hi there,

I’m trying to fir the warning for MySQL 4-byte support:

I’m following these instructions:
https://docs.nextcloud.com/server/15/admin_manual/configuration_database/mysql_4byte_support.html

My settings in /etc/mysql/mariadb.conf.d/50-server.cnf are:
image

With this query i get the following results:

SELECT NAME, SPACE, FILE_FORMAT FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME like "nextcloud%";

But when I try to generate the SQL commands I get no result:

USE INFORMATION_SCHEMA;
SELECT CONCAT(“ALTER TABLE ", TABLE_SCHEMA,".", TABLE_NAME, " ROW_FORMAT=DYNAMIC;”) AS MySQLCMD FROM TABLES WHERE TABLE_SCHEMA = “nextcloud”;

image

Do you have any idea what I’m doing wrong?

Greetings
Patrick

Edit: I forgot to mention that my nextcloud instance is hosted on an raspberry pi.

shared hosting?

Ah, sorry.
Forgot to mention that it’s a local Rapsberry Pi.

I believe you have different quotes around ALTER TABLE (German keyboard?)
“ALTER TABLE "
Same at the end of DYNAMIC;

Copy-paste this
SELECT CONCAT("ALTER TABLE ", TABLE_SCHEMA,".", TABLE_NAME, " ROW_FORMAT=DYNAMIC;") AS MySQLCMD FROM TABLES WHERE TABLE_SCHEMA = "nextcloud";

Yes, I’m using a german keybaord.
But even with your suggestion it doesn’t work.

Ok, I guess I made a step forward.
Obviously the error was that my tables are called nextcloud_db, not nextcloud.
The command should be:

SELECT CONCAT(“ALTER TABLE “, TABLE_SCHEMA,”.”, TABLE_NAME, " ROW_FORMAT=DYNAMIC;") AS MYSQLCMD FROM TABLES WHERE TABLE_SCHEMA = “nextcloud_db”;

Then I get this response:
image

Sorry again. I thought my problem is solved.
But now I ran in the next one.
All my tables are migrated to Barracuda but nextcloud still reports the problem with 4-byte support:
image
image

Am I missing something after migrating the database?

Restart the database?

I already restarted the raspi.

Can this be of help (additional lines under [mysqld]?

When adding these lines

character-set-server = utf8mb4
collation-server = utf8mb4_general_ci
transaction_isolation = READ-COMMITTED
binlog_format = ROW

image

I still get the 4-byte support warning

image

EDIT:
Next thing I tried was to fix the database with these commands:

sudo -u www-data php occ maintenance:mode --on
sudo -u www-data php occ upgrade
sudo -u www-data php occ db:add-missing-indices
sudo -u www-data php occ db:convert-filecache-bigint
sudo -u www-data php occ maintenance:mimetype:update-js
sudo -u www-data php occ maintenance:mimetype:update-db
sudo -u www-data php occ maintenance:theme:update
sudo -u www-data php occ maintenance:update:htaccess
sudo -u www-data php occ maintenance:repair
sudo -u www-data php occ maintenance:mode --off

But that didn’t work either.
I think I give up until I have another idea.
Nextcloud is working anyway…

EDIT:
Ok one last try.
With this instruction: https://www.allerstorfer.at/enabling-mysql-4-byte-support-for-nextcloud-on-ubuntu-18-04/
I made these additional steps:

MariaDB [(none)]> ALTER DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

and

sudo -u www-data php occ config:system:set mysql.utf8mb4 --type boolean --value=“true”

and

sudo -u www-data php occ maintenance:repair

and that fixed it at the end!

image

had tried everything, I think this problem is insoluble, at least for me it was so, just ignore the message.

Sorry, I was editing my post and didn’t see that you have answered.
My problem was solved with the additional steps. :slight_smile: