Installing KC on bare metal following the official
docs here and then moving it to MariaDB for production leads to a broken install, caused by the missing casefolding in the database. During startup you get
this kind of error messages.
I don't know if this is documented somewhere and I couldn't find it or if it is obvious hence not documented, but I feel like a little note in the docs could have helped me out a lot.
Anyway, after many trials and errors that eventually led me to deduce that casefolding was the culprit, I was able to move KC to MariaDB with the folloing steps:
- update your kernel to at least release 5.2 built with CONFIG_UNICODE=y (for Debian that means at least 5.13)
- create a ext4 filesystem to hold the MariaDB databases using the casefold options: `mkfs -t ext4 -O casefold -E encoding_flags=strict /dev/...`
- configure fstab to mount that filesystem on /srv/databases
- configure MariaDB to store databases in a subdirectory of that filesystem: `datadir=/srv/databases/mariadb`
- configure MariaDB to ignore case when querying: `lower_case_table_names=2`
- stop MariaDB, move databases from /var/lib/mysql to /srv/databases/mariadb and start MariaDB again
- Setup KC to use MariaDB and enjoy