Database should support the configured character set

I get the following message during installation of CCMS 9.3.9:
“Database should support the configured character set and collation
The database does not have a complete support for all the Unicode characters. This implies, for example, that you may not be able to save emoticons (it’s the same behavior as concrete5 versions older than 8.5.0). You should upgrade your database to fix this issue.”

What does that mean? What’s wrong with my database?
I’m using
mariadbd: Ver 11.7.2-MariaDB-ubu2404 for debian-linux-gnu on aarch64 (mariadb.org binary distribution)
database: c5_fhs | CREATE DATABASE c5_fhs /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci */

The problem is that your DB server is configured in a way that prevents supporting utf8mb4 keys of at least 255 chars long (that is, 255 × 4 bytes).

Try for example to create a table like this:

CREATE TABLE test (
  id varchar(255) NOT NULL,
  PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;

You won’t be able to do that with your configuration.

Hi mlocati, thanks for your quick response! I tried what you proposed and as far as I understand it worked well (see screenshot). What is it I have to change with the configuration? I’m developing with Concrete since 15 Years, but I’m not really familiar with the internals of MariaDB. I use the same configuration (i.e. same Docker image) for several other projects and never had problems. Is this a Concrete5 issue or something?

It’s probably unlikely, but maybe someone will encounter similar problems, so I’m explaining the solution I found myself today:

The cause has nothing to do specifically with ConcreteCMS or MariaDB, not with missing or incorrect character sets, as the error message insinuated, but the problem was that the Docker container that I created for the installation (I used the images Package docker5 · GitHub, mariadb and adminer) binds the directory for the database (/var/lib/mysql) to a host directory. The host is a MacOS notebook with a case-insensitive APFS partition (standard on Macs), but the container (Linux) has a case-sensitive file system. And that is the cause of the problem.

The solution is simple: I created a case-sensitive APFS partition on my Mac and mapped the directory there and everything works like a charm!

I use some other Docker containers for development, also with bound MariaDB directories, and never had this problem. I’m not sure but it could be because I don’t use uppercase in my own databases, while ConcreteCMS does.

1 Like