How safe is it to enable mysql 4-byte support

Hi everyone,

Since quite some years now I have a nextcloud instyance helping me getting away from the GAFAMs. This means that my database was also setup quite some years ago.

Now, I would like to enable mysql 4-byte support on my database.
the nextcloud version is 15 and mysql 5.5.62 on a debian 8.

If I follow the docs I should perform these steps:

SET GLOBAL innodb_file_format=Barracuda;

Then change my mysql conf to

[mysqld]
innodb_large_prefix=true
innodb_file_format=barracuda
innodb_file_per_table=1

Restart the mysql server

Update my nextcloud database

ALTER DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

And finish with these:

sudo -u www-data php occ config:system:set mysql.utf8mb4 --type boolean --value="true"
sudo -u www-data php occ maintenance:repair

After these steps, and some magics and the mysql side, everything should have been converted without problems ???

I am only wondering if changing the innodb settings is safe on a server that also has other batabases in it ?

I am not a MySQL expert at all but changing the innodb settings that easily looks like magics to me so that’s why I am wondering!

Any help/thoughts are welcome!

hello,

i ve done it on stretch without troubles.
The barracuda is applied to new db or tables. or apply with replication or recreation.
old table stayed in antilope.

Remember debian 8 EOL is july 2020…

maybe upgrading to stretch or buster is a smarter move ?

I think this is supposed to be a safe procedure if done how Nextcloud docs say to do it, but if safe is what you want, then I would either put it in maintenance mode and backup/snapshot or copy your setup to a test environment to see if it’s going to break anything.

My debian is indeed getting old, upgrading will happen soon (stretch, then, buster).

Alright, so changing the charset seems safe, but i do not get why the change is file format is required since it will only affect new db/tables. Or am I not knowledgeable enough to understand what’s going on on the MySQL side (that is definitely an option)

I also read that the file format would not be barracuda, unless the specific requirement like the row format require the barracuda format.

So now, I am wondering how the file format in related to the charset…