Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-18646

mysqld ignoring character_set_server and collation_server directives in config files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Not a Bug
    • Affects Version/s: 10.3.12
    • Fix Version/s: N/A
    • Labels:
    • Environment:
      Host: VMWare
      OS: Windows 10 Enterprise 64 bit v1809
      OS Build: 17763.253

      Mariadb: mysql Ver 15.1 Distrib 10.3.12-MariaDB, for Win64 (AMD64), source revision faf206a848684bc0f87c93a2b47a55063bbccc6c

      Description

      I spent several days grappling with "character encoding hell" trying to get my mariadb setup "unicode clean".

      Having found the recommended incantation in the Mariadb docs at
      https://mariadb.com/kb/en/library/setting-character-sets-and-collations/
      to set the whole system to "utf8mb4" top to bottom I _almost _had things looking right under 10.3.8.

      I decided to upgrade to the latest stable version (10.3.12) to try to finalise things, but this seems to have caused a regression. In 10.3.12 with an unchanged config the system is ignoring the character_set_server and collation_server directives in the config files, and reporting both these settings as the default (latin1 and latin1_swedish_ci respectively) on startup.

      Config files are as below (all except C:\my.cnf that contains a default database, user and password for my dev account)

      C:\Program Files\MariaDB 10.3\my.cnf

      #
      # Set everything to utf8
      #
      # (per https://mariadb.com/kb/en/library/setting-character-sets-and-collations/)
      #
       
      [client]
      default_character_set=utf8mb4
       
      [mysql]
      default_character_set=utf8mb4
       
      [mysqld]
      character_set_server = utf8mb4
      collation_server = utf8mb4_general_ci
      init_connect='SET NAMES utf8mb4'
       
      # Tried but found ineffective...
      #
      #init_connect='SET NAMES utf8mb4 COLLATE utf8mb4_general_ci'
      #character_set_client_handshake = FALSE
      

      C:\Program Files\MariaDB 10.3\data\my.ini

      [mysqld]
      datadir=C:/Program Files/MariaDB 10.3/data
      port=3306
      innodb_buffer_pool_size=1023M
      [client]
      port=3306
      plugin-dir=C:/Program Files/MariaDB 10.3/lib/plugin
      

      Server state after restarting the MySQL service-

      >mysql -e "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     | latin1                                        |
      | character_set_system     | utf8                                          |
      | character_sets_dir       | C:\Program Files\MariaDB 10.3\share\charsets\ |
      +--------------------------+-----------------------------------------------+
       
      >mysql -e "show variables like '%coll%';"
      +----------------------+--------------------+
      | Variable_name        | Value              |
      +----------------------+--------------------+
      | collation_connection | utf8mb4_general_ci |
      | collation_database   | utf8mb4_general_ci |
      | collation_server     | latin1_swedish_ci  |
      +----------------------+--------------------+
      

        Attachments

          Activity

            People

            Assignee:
            wlad Vladislav Vaintroub
            Reporter:
            incansvl VL Incans
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration