title: Setting UTF-8 in MariaDB server ignores character_set_system
body: <p>I have the following <code>Dockerfile</code> definition file for a MariaDB server:</p>
  <pre class="lang-yaml prettyprint-override"><code>version: &quot;3.8&quot;
  
  ...
  
  services:
    database:
      command: [&quot;mysqld&quot;, &quot;--character-set-server=utf8mb4&quot;, &quot;--collation-server=utf8mb4_unicode_ci&quot;]
      container_name: mariadb
      environment:
        MARIADB_DATABASE: sample_database
        MARIADB_INITDB_SKIP_TZINFO: &quot;true&quot;
        MARIADB_PASSWORD_FILE: /run/secrets/mariadb_user_password
        MARIADB_ROOT_PASSWORD_FILE: /run/secrets/root_user_password
        MARIADB_USER: mariadb
        TZ: &quot;Etc/UTC&quot; # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
      image: docker.io/library/mariadb:10.6-focal # https://hub.docker.com/_/mariadb/
      networks:
        - global-network
      ports:
        - &quot;3306:3306&quot;
      restart: on-failure
      secrets:
        - mariadb_user_password
        - root_user_password
      stdin_open: true
      tty: true
      volumes:
        - &quot;database-volume:/var/lib/mysql&quot;
  </code></pre>
  <p>I'm not quite versed on this topic, but if I would like to check the character- and collation-set used by the server, I usually do execute these queries:</p>
  <pre class="lang-sql prettyprint-override"><code>&gt; show variables like 'char%';
  +------------------------+--------------------------+
  |Variable_name           |Value                     |
  +------------------------+--------------------------+
  |character_set_client    |utf8mb4                   |
  |character_set_connection|utf8mb4                   |
  |character_set_database  |utf8mb4                   |
  |character_set_filesystem|binary                    |
  |character_set_results   |utf8mb4                   |
  |character_set_server    |utf8mb4                   |
  |character_set_system    |utf8mb3                   |
  |character_sets_dir      |/usr/share/mysql/charsets/|
  +------------------------+--------------------------+
  
  
  &gt; show variables like 'collation%';
  +--------------------+------------------+
  |Variable_name       |Value             |
  +--------------------+------------------+
  |collation_connection|utf8mb4_unicode_ci|
  |collation_database  |utf8mb4_unicode_ci|
  |collation_server    |utf8mb4_unicode_ci|
  +--------------------+------------------+
  </code></pre>
  <p>My understanding is that the settings that I have: <code>--character-set-server=utf8mb4</code> and <code>--collation-server=utf8mb4_unicode_ci</code> are the correct ones to set both, the character set and collation to <code>UTF-8</code>.</p>
  <p>Now my questions is: how do I get rid of that <code>utf8mb3</code> value for <code>character_set_system</code>? It should be set to <code>utf8mb4</code> along with the other values — or that's what I think ;)</p>
  <p>Any clues how to set this correctly?</p>
  <blockquote>
  <p>I would like to avoid using any configuration file(s) (like <code>my.cnf</code>) since I'm using the stock Docker image without any modifications.</p>
  </blockquote>