• Bug#1104533: debian-start: ERROR 1267 (HY000): Illegal mix of collation

    From =?utf-8?q?Samuli_Suonp=C3=A4=C3=A4?@21:1/5 to All on Thu May 1 18:10:05 2025
    Package: mariadb-server
    Version: 1:11.8.1-4
    Severity: normal

    After upgrading from bookworm to trixie, starting mariadb produces this
    error message in journal:

    May 01 18:17:39 back debian-start[148992]: --------------
    May 01 18:17:39 back debian-start[148992]: SELECT count(*) FROM mysql.user WHERE user='root' and password='' and password_expired='N' and plugin in ('', 'mysql_native_password', 'mysql_old_password')
    May 01 18:17:39 back debian-start[148992]: --------------
    May 01 18:17:39 back debian-start[148992]: ERROR 1267 (HY000) at line 1: Illegal mix of collations (utf8mb4_general_ci,COERCIBLE) and (utf8mb4_uca1400_ai_ci,COERCIBLE) for operation '='

    mariadb-server dows start and appears to run fine.

    I can also reproduce the error manually with the following query:

    MariaDB [(none)]> SELECT * FROM mysql.user where password_expired='N';
    ERROR 1267 (HY000): Illegal mix of collations (utf8mb4_general_ci,COERCIBLE) and (utf8mb4_uca1400_ai_ci,COERCIBLE) for operation '='

    Please let me know if I can provide any more information.

    Samuli

    -- System Information:
    Debian Release: trixie/sid
    APT prefers testing
    APT policy: (900, 'testing'), (700, 'unstable'), (500, 'experimental') Architecture: amd64 (x86_64)

    Kernel: Linux 6.12.22-cloud-amd64 (SMP w/2 CPU threads; PREEMPT)
    Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8), LANGUAGE=en_IE:en
    Shell: /bin/sh linked to /usr/bin/dash
    Init: systemd (via /run/systemd/system)
    LSM: AppArmor: enabled

    Versions of packages mariadb-server depends on:
    ii adduser 3.150
    ii debconf [debconf-2.0] 1.5.91
    ii galera-4 26.4.21-1
    ii gawk 1:5.2.1-2+b1
    ii init-system-helpers 1.68
    ii iproute2 6.14.0-3
    ii libc6 2.41-7
    ii libdbi-perl 1.647-1
    ii libgcc-s1 14.2.0-19
    ii libpam0g 1.7.0-3
    ii libssl3t64 3.5.0-1
    ii libstdc++6 14.2.0-19
    ii lsof 4.99.4+dfsg-2
    ii mariadb-client 1:11.8.1-4
    ii mariadb-common 1:11.8.1-4
    ii mariadb-server-core 1:11.8.1-4
    ii passwd 1:4.17.4-2
    ii perl 5.40.1-3
    ii procps 2:4.0.4-8
    ii psmisc 23.7-2
    ii rsync 3.4.1+ds1-3
    ii socat 1.8.0.3-1
    ii zlib1g 1:1.3.dfsg+really1.3.1-1+b1

    Versions of packages mariadb-server recommends:
    ii libhtml-template-perl 2.97-2
    ii mariadb-plugin-provider-bzip2 1:11.8.1-4
    ii mariadb-plugin-provider-lz4 1:11.8.1-4
    ii mariadb-plugin-provider-lzma 1:11.8.1-4
    ii mariadb-plugin-provider-lzo 1:11.8.1-4
    ii mariadb-plugin-provider-snappy 1:11.8.1-4
    ii pv 1.9.31-1

    Versions of packages mariadb-server suggests:
    ii bsd-mailx [mailx] 8.1.2-0.20220412cvs-1
    pn mariadb-test <none>
    ii netcat-openbsd 1.228-1

    -- Configuration Files:
    /etc/logcheck/ignore.d.paranoid/mariadb-server [Errno 13] Permission denied: '/etc/logcheck/ignore.d.paranoid/mariadb-server'
    /etc/logcheck/ignore.d.server/mariadb-server [Errno 13] Permission denied: '/etc/logcheck/ignore.d.server/mariadb-server'
    /etc/logcheck/ignore.d.workstation/mariadb-server [Errno 13] Permission denied: '/etc/logcheck/ignore.d.workstation/mariadb-server'

    -- debconf information:
    mariadb-server/old_data_directory_saved:
    mariadb-server/nis_warning:
    mariadb-server/postrm_remove_databases: false

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?B?T3R0byBLZWvDpGzDpGluZW4=?@21:1/5 to All on Sun May 11 23:20:01 2025
    Control: tags -1 moreinfo

    After upgrading from bookworm to trixie, starting mariadb produces this
    error message in journal:

    May 01 18:17:39 back debian-start[148992]: --------------
    May 01 18:17:39 back debian-start[148992]: SELECT count(*) FROM mysql.user WHERE user='root' and password='' and password_expired='N' and plugin in ('', 'mysql_native_password', 'mysql_old_password')
    May 01 18:17:39 back debian-start[148992]: --------------
    May 01 18:17:39 back debian-start[148992]: ERROR 1267 (HY000) at line 1: Illegal mix of collations (utf8mb4_general_ci,COERCIBLE) and (utf8mb4_uca1400_ai_ci,COERCIBLE) for operation '='

    mariadb-server dows start and appears to run fine.

    I can also reproduce the error manually with the following query:

    MariaDB [(none)]> SELECT * FROM mysql.user where password_expired='N';
    ERROR 1267 (HY000): Illegal mix of collations (utf8mb4_general_ci,COERCIBLE) and (utf8mb4_uca1400_ai_ci,COERCIBLE) for operation '='

    Please let me know if I can provide any more information.

    What are the steps to reproduce this?

    Both before and after the upgrade when I run these SQL commands I get
    the exact same results. I am not able to reproduce the illegal mix of collations you have.

    MariaDB [(none)]> SELECT count(*) FROM mysql.user WHERE user='root'
    and password='' and password_expired='N' and plugin in ('', 'mysql_native_password', 'mysql_old_password');
    +----------+
    | count(*) |
    +----------+
    | 0 |
    +----------+
    1 row in set (0.004 sec)

    MariaDB [(none)]> SHOW WARNINGS;
    Empty set (0.000 sec)

    MariaDB [(none)]> SELECT Host,User FROM mysql.user where password_expired='N'; +-----------+-------+
    | Host | User |
    +-----------+-------+
    | localhost | root |
    | localhost | mysql |
    +-----------+-------+

    MariaDB [(none)]> SHOW WARNINGS;
    Empty set (0.001 sec)


    I followed the exact steps we also have in CI at https://salsa.debian.org/otto/mariadb-server/-/jobs/7566186 to start a
    Bookworm container, install MariaDB, enable Sid and upgrade with
    apt-get full-upgrade -qq --yes.

    The CI includes running command 'mariadb --table -e "SELECT host,user,plugin,authentication_string FROM user;" mysql', in addition
    to starting with service file, which both should trigger the warning,
    but I don't see any warnings in Bookworm CI job, nor in Buster or
    Bullseye upgrades either (https://salsa.debian.org/otto/mariadb-server/-/jobs/7566190, https://salsa.debian.org/otto/mariadb-server/-/jobs/7566189).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?utf-8?Q?Samuli_Suonp=C3=A4=C3=A4?@21:1/5 to All on Mon May 12 22:40:01 2025
    What are the steps to reproduce this?

    Both before and after the upgrade when I run these SQL commands I get
    the exact same results. I am not able to reproduce the illegal mix of collations you have.


    I did some testing with kvm virtual machines and I believe I now have a way to reproduce this.

    1. I set up a clean Debian bookworm (12.10.0) on a vm.
    2. apt-get install mariadb-server mariadb
    3. apt-get full-upgrade (to trixie)

    This triggers the problem. However, If I first upgrade the clean bookworm to trixie and only then install mariadb, no problems whatsoever.

    With bookworm:

    MariaDB [mysql]> SELECT count(*) FROM mysql.user WHERE user='root' and password='' and password_expired='N' and plugin in ('', 'mysql_native_password', 'mysql_old_password');
    +----------+
    | count(*) |
    +----------+
    | 0 |
    +----------+
    1 row in set (0.002 sec)

    MariaDB [mysql]> SHOW VARIABLES LIKE '%collation%'; +----------------------+--------------------+
    | Variable_name | Value | +----------------------+--------------------+
    | collation_connection | utf8mb3_general_ci |
    | collation_database | utf8mb4_general_ci |
    | collation_server | utf8mb4_general_ci | +----------------------+--------------------+
    3 rows in set (0.002 sec)

    MariaDB [mysql]>


    After upgrading to trixie:

    MariaDB [mysql]> SELECT count(*) FROM mysql.user WHERE user='root' and password='' and password_expired='N' and plugin in ('', 'mysql_native_password', 'mysql_old_password');
    ERROR 1267 (HY000): Illegal mix of collations (utf8mb4_general_ci,COERCIBLE) and (utf8mb4_uca1400_ai_ci,COERCIBLE) for operation '='
    MariaDB [mysql]> SHOW VARIABLES LIKE '%collation%'; +--------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
    | Variable_name | Value |
    +--------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
    | character_set_collations | utf8mb3=utf8mb3_uca1400_ai_ci,ucs2=ucs2_uca1400_ai_ci,utf8mb4=utf8mb4_uca1400_ai_ci,utf16=utf16_uca1400_ai_ci,utf32=utf32_uca1400_ai_ci |
    | collation_connection | utf8mb4_uca1400_ai_ci |
    | collation_database | utf8mb4_general_ci |
    | collation_server | utf8mb4_uca1400_ai_ci |
    +--------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
    4 rows in set (0.003 sec)

    MariaDB [mysql]>


    Trixie, with mariadb first installed only after upgrading to trixie:

    MariaDB [mysql]> SELECT count(*) FROM mysql.user WHERE user='root' and password='' and password_expired='N' and plugin in ('', 'mysql_native_password', 'mysql_old_password');
    +----------+
    | count(*) |
    +----------+
    | 0 |
    +----------+
    1 row in set (0.002 sec)

    MariaDB [mysql]> SHOW VARIABLES LIKE '%collation%'; +--------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
    | Variable_name | Value |
    +--------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
    | character_set_collations | utf8mb3=utf8mb3_uca1400_ai_ci,ucs2=ucs2_uca1400_ai_ci,utf8mb4=utf8mb4_uca1400_ai_ci,utf16=utf16_uca1400_ai_ci,utf32=utf32_uca1400_ai_ci |
    | collation_connection | utf8mb4_uca1400_ai_ci |
    | collation_database | utf8mb4_uca1400_ai_ci |
    | collation_server | utf8mb4_uca1400_ai_ci |
    +--------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
    4 rows in set (0.002 sec)

    MariaDB [mysql]>


    I believe collation should be “utf8mb4_uca1400_ai_ci” in trixie (MariaDB 11.8.1), when in bookworm (MariaDB 10.11.11) it it “utf8mb4_general_ci”.

    Here we can see that if MariaDB 10.11.1 (bookworm) is upgraded to MariaDB 11.8.1 (trixie), collation_connection and collation_server will be “utf8mb4_uca1400_ai_ci”, but collation_database remain utf8mb4_general_ci.

    Is this where the problem might be?

    Unfortunately I really do not understand how this collation thing works. Anyway, please advice if I should provide more information.

    Regards,
    Samuli

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?B?T3R0byBLZWvDpGzDpGluZW4=?@21:1/5 to All on Tue May 13 03:20:01 2025
    Thanks!

    Interestingly, I get slightly different results:

    $ podman run --interactive --network host --tty --rm --shm-size=1G -e DISPLAY=$DISPLAY --volume=$PWD:/tmp/run --workdir=/tmp/run
    debian:bookworm bash

    # apt-get update && apt-get install -y mariadb-server
    # service mariadb start
    # dpkg -l mariadb-server --no-pager
    | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
    ||/ Name Version Architecture Description +++-==============-====================-============-=================================
    ii mariadb-server 1:10.11.11-0+deb12u1 amd64 MariaDB database
    server binaries

    # mariadb -e "SHOW VARIABLES LIKE '%collation%';" +----------------------+--------------------+
    | Variable_name | Value | +----------------------+--------------------+
    | collation_connection | latin1_swedish_ci |
    | collation_database | utf8mb4_general_ci |
    | collation_server | utf8mb4_general_ci | +----------------------+--------------------+

    # echo 'deb http://deb.debian.org/debian sid main' > /etc/apt/sources.list
    # apt-get full-upgrade -y
    # mariadb -e "SELECT count(*) FROM mysql.user WHERE user='root' and
    password='' and password_expired='N' and plugin in ('', 'mysql_native_password', 'mysql_old_password');"
    +----------+
    | count(*) |
    +----------+
    | 0 |
    +----------+

    # mariadb -e "SHOW VARIABLES LIKE '%collation%';" +--------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
    | Variable_name | Value

    | +--------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
    | character_set_collations | utf8mb3=utf8mb3_uca1400_ai_ci,ucs2=ucs2_uca1400_ai_ci,utf8mb4=utf8mb4_uca1400_ai_ci,utf16=utf16_uca1400_ai_ci,utf32=utf32_uca1400_ai_ci
    |
    | collation_connection | latin1_swedish_ci

    |
    | collation_database | utf8mb4_uca1400_ai_ci

    |
    | collation_server | utf8mb4_uca1400_ai_ci

    | +--------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?utf-8?Q?Samuli_Suonp=C3=A4=C3=A4?@21:1/5 to All on Fri May 16 00:20:01 2025
    Interestingly, I get slightly different results:
    ...
    # mariadb -e "SHOW VARIABLES LIKE '%collation%';" +----------------------+--------------------+
    | Variable_name | Value | +----------------------+--------------------+
    | collation_connection | latin1_swedish_ci |
    | collation_database | utf8mb4_general_ci |
    | collation_server | utf8mb4_general_ci | +----------------------+--------------------+

    I am now fairly sure this is a locale issue. I believe we get different results because we have different locale configurations. Mine is .UTF-8. Yours probably latin1?

    Two test runs.

    1. Clean bookworm, default locale C.UTF-8.
    # locale
    LANG=C.UTF-8
    LANGUAGE=
    LC_CTYPE="C.UTF-8"
    LC_NUMERIC="C.UTF-8"
    LC_TIME="C.UTF-8"
    LC_COLLATE="C.UTF-8"
    LC_MONETARY="C.UTF-8"
    LC_MESSAGES="C.UTF-8"
    LC_PAPER="C.UTF-8"
    LC_NAME="C.UTF-8"
    LC_ADDRESS="C.UTF-8"
    LC_TELEPHONE="C.UTF-8"
    LC_MEASUREMENT="C.UTF-8"
    LC_IDENTIFICATION="C.UTF-8"
    LC_ALL=
    # apt install mariadb-server

    # mariadb -e "SHOW VARIABLES LIKE '%collation%';" +----------------------+--------------------+
    | Variable_name | Value | +----------------------+--------------------+
    | collation_connection | utf8mb3_general_ci |
    | collation_database | utf8mb4_general_ci |
    | collation_server | utf8mb4_general_ci | +----------------------+——————————+
    # mariadb -e "SELECT count(*) FROM mysql.user WHERE user='root' and password='' and password_expired='N' and plugin in ('','mysql_native_password', 'mysql_old_password');"
    +----------+
    | count(*) |
    +----------+
    | 0 |
    +----------+
    # echo deb http://deb.debian.org/debian/ trixie main contrib non-free non-free-firmware > /etc/apt/sources.list
    # apt update

    # apt full-upgrade

    # mariadb -e "SHOW VARIABLES LIKE '%collation%';" +--------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
    | Variable_name | Value |
    +--------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
    | character_set_collations | utf8mb3=utf8mb3_uca1400_ai_ci,ucs2=ucs2_uca1400_ai_ci,utf8mb4=utf8mb4_uca1400_ai_ci,utf16=utf16_uca1400_ai_ci,utf32=utf32_uca1400_ai_ci |
    | collation_connection | utf8mb4_uca1400_ai_ci |
    | collation_database | utf8mb4_uca1400_ai_ci |
    | collation_server | utf8mb4_uca1400_ai_ci |
    +--------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
    # mariadb -e "SELECT count(*) FROM mysql.user WHERE user='root' and password='' and password_expired='N' and plugin in ('','mysql_native_password', 'mysql_old_password’);”
    --------------
    SELECT count(*) FROM mysql.user WHERE user='root' and password='' and password_expired='N' and plugin in ('','mysql_native_password', 'mysql_old_password')
    --------------

    ERROR 1267 (HY000) at line 1: Illegal mix of collations (utf8mb4_general_ci,COERCIBLE) and (utf8mb4_uca1400_ai_ci,COERCIBLE) for operation '='

    2. Clean bookworm, default locale NONE
    # locale
    LANG=
    LANGUAGE=en_US:en
    LC_CTYPE="POSIX"
    LC_NUMERIC="POSIX"
    LC_TIME="POSIX"
    LC_COLLATE="POSIX"
    LC_MONETARY="POSIX"
    LC_MESSAGES="POSIX"
    LC_PAPER="POSIX"
    LC_NAME="POSIX"
    LC_ADDRESS="POSIX"
    LC_TELEPHONE="POSIX"
    LC_MEASUREMENT="POSIX"
    LC_IDENTIFICATION="POSIX"
    LC_ALL=
    # apt install mariadb-server

    # mariadb -e "SHOW VARIABLES LIKE '%collation%';" +----------------------+--------------------+
    | Variable_name | Value | +----------------------+--------------------+
    | collation_connection | latin1_swedish_ci |
    | collation_database | utf8mb4_general_ci |
    | collation_server | utf8mb4_general_ci | +----------------------+——————————+
    # mariadb -e "SELECT count(*) FROM mysql.user WHERE user='root' and password='' and password_expired='N' and plugin in ('','mysql_native_password', 'mysql_old_password');"
    +----------+
    | count(*) |
    +----------+
    | 0 |
    +----------+
    # echo deb http://deb.debian.org/debian/ trixie main contrib non-free non-free-firmware > /etc/apt/sources.list
    # apt update

    # apt full-upgrade

    # mariadb -e "SHOW VARIABLES LIKE '%collation%’;"
    # mariadb -e "SHOW VARIABLES LIKE '%collation%';" +--------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
    | Variable_name | Value |
    +--------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
    | character_set_collations | utf8mb3=utf8mb3_uca1400_ai_ci,ucs2=ucs2_uca1400_ai_ci,utf8mb4=utf8mb4_uca1400_ai_ci,utf16=utf16_uca1400_ai_ci,utf32=utf32_uca1400_ai_ci |
    | collation_connection | latin1_swedish_ci |
    | collation_database | utf8mb4_uca1400_ai_ci |
    | collation_server | utf8mb4_uca1400_ai_ci |
    +--------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+
    # mariadb -e "SELECT count(*) FROM mysql.user WHERE user='root' and password='' and password_expired='N' and plugin in ('','mysql_native_password', 'mysql_old_password');”
    # mariadb -e "SELECT count(*) FROM mysql.user WHERE user='root' and password='' and password_expired='N' and plugin in ('','mysql_native_password', 'mysql_old_password');"
    +----------+
    | count(*) |
    +----------+
    | 0 |
    +----------+

    My guess is, this problem has something to do with the difference between utf8mb3 and utf8mb4 (i.e. 3-byte UTF8 and 4-byte UTF8). I guess utf8mb3 collation is incompatible with utf8mb4.

    Until MariaDB 11.5, the default character set was latin1, except in Debian, where it was utf8mb3. Thus, in bookworm, MariaDB defaults to utf8mb3.

    From 11.6 on, the default character set has been utf8mb4, both in vanilla MariaDB and Debian MariaDB. So trixie defaults to utf8mb4.

    Also, please note this (using the vm in example 1, Clean bookworm, default locale C.UTF-8):

    # LC_CTYPE=C mariadb -e "SELECT count(*) FROM mysql.user WHERE user='root' and password='' and password_expired='N' and plugin in ('','mysql_native_password', 'mysql_old_password');"
    +----------+
    | count(*) |
    +----------+
    | 0 |
    +----------+
    root@playground:~# LC_CTYPE=C.UTF-8 mariadb -e "SELECT count(*) FROM mysql.user WHERE user='root' and password='' and password_expired='N' and plugin in ('','mysql_native_password', 'mysql_old_password');"
    --------------
    SELECT count(*) FROM mysql.user WHERE user='root' and password='' and password_expired='N' and plugin in ('','mysql_native_password', 'mysql_old_password')
    --------------

    ERROR 1267 (HY000) at line 1: Illegal mix of collations (utf8mb4_general_ci,COERCIBLE) and (utf8mb4_uca1400_ai_ci,COERCIBLE) for operation '='



    <html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); overflow-
    wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div dir="auto" style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><blockquote type="cite">Interestingly, I get slightly different
    results:<br></blockquote><span style="caret-color: rgb(255, 255, 255); color: rgb(255, 255, 255);">...</span><br style="caret-color: rgb(255, 255, 255); color: rgb(255, 255, 255);"><blockquote type="cite"># mariadb -e "SHOW VARIABLES LIKE '%collation%';"<
    +----------------------+--------------------+<br>| Variable_name &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| Value &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|<br>+----------------------+--------------------+<br>|
    collation_connection | latin1_swedish_ci &nbsp;|<br>| collation_database &nbsp;&nbsp;| utf8mb4_general_ci |<br>| collation_server &nbsp;&nbsp;&nbsp;&nbsp;| utf8mb4_general_ci |<br>+----------------------+--------------------+<br></blockquote><div style="
    caret-color: rgb(255, 255, 255); color: rgb(255, 255, 255);"><br></div></div><div>I am now fairly sure this is a locale issue.&nbsp;I believe we get different results because we have different locale configurations. Mine is .UTF-8. Yours probably latin1?<
    /div><div><br></div><div>Two test runs.</div><div><br></div><div>1. Clean bookworm, default locale C.UTF-8.</div><div># locale</div><div><div>LANG=C.UTF-8</div><div>LANGUAGE=</div><div>LC_CTYPE="C.UTF-8"</div><div>LC_NUMERIC="C.UTF-8"</div><div>LC_TIME="
    C.UTF-8"</div><div>LC_COLLATE="C.UTF-8"</div><div>LC_MONETARY="C.UTF-8"</div><div>LC_MESSAGES="C.UTF-8"</div><div>LC_PAPER="C.UTF-8"</div><div>LC_NAME="C.UTF-8"</div><div>LC_ADDRESS="C.UTF-8"</div><div>LC_TELEPHONE="C.UTF-8"</div><div>LC_MEASUREMENT="C.
    UTF-8"</div><div>LC_IDENTIFICATION="C.UTF-8"</div><div>LC_ALL=</div></div><div># apt install mariadb-server</div><div>…</div><div><div># mariadb -e "SHOW VARIABLES LIKE '%collation%';"</div><div>+----------------------+--------------------+</div><div>|
    Variable_name &nbsp; &nbsp; &nbsp; &nbsp;| Value &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|</div><div>+----------------------+--------------------+</div><div>| collation_connection | utf8mb3_general_ci |</div><div>| collation_database &nbsp; |
    utf8mb4_general_ci |</div><div>| collation_server &nbsp; &nbsp; | utf8mb4_general_ci |</div><div>+----------------------+——————————+</div></div><div><div># mariadb -e "SELECT count(*) FROM mysql.user WHERE user='root' and password=''
    and password_expired='N' and plugin in ('','mysql_native_password', 'mysql_old_password');"</div><div>+----------+</div><div>| count(*) |</div><div>+----------+</div><div>| &nbsp; &nbsp; &nbsp; &nbsp;0 |</div><div>+----------+</div></div><div># echo deb
    http://deb.debian.org/debian/ trixie main contrib non-free non-free-firmware &gt; /etc/apt/sources.list</div><div># apt update</div><div>…</div><div># apt full-upgrade</div><div>…</div><div><div># mariadb -e "SHOW VARIABLES LIKE '%collation%';"</div><
    +--------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+</div></div><div><div>| Variable_name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|
    Value &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &
    nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |</div><div>+--------------------------+------
    -----------------------------------------------------------------------------------------------------------------------------------+</div><div>| character_set_collations | utf8mb3=utf8mb3_uca1400_ai_ci,ucs2=ucs2_uca1400_ai_ci,utf8mb4=utf8mb4_uca1400_ai_
    ci,utf16=utf16_uca1400_ai_ci,utf32=utf32_uca1400_ai_ci |</div><div>| collation_connection &nbsp; &nbsp; | utf8mb4_uca1400_ai_ci &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &
    nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &
    nbsp; &nbsp; &nbsp; |</div><div>| collation_database &nbsp; &nbsp; &nbsp; | utf8mb4_uca1400_ai_ci &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &
    nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |</div><
    | collation_server &nbsp; &nbsp; &nbsp; &nbsp; | utf8mb4_uca1400_ai_ci &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &
    nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |</div><div>+-------------------
    -------+-----------------------------------------------------------------------------------------------------------------------------------------+</div></div><div><div># mariadb -e "SELECT count(*) FROM mysql.user WHERE user='root' and password='' and
    password_expired='N' and plugin in ('','mysql_native_password', 'mysql_old_password’);”</div><div><div>--------------</div><div>SELECT count(*) FROM mysql.user WHERE user='root' and password='' and password_expired='N' and plugin in ('','mysql_native_
    password', 'mysql_old_password')</div><div>--------------</div><div><br></div><div>ERROR 1267 (HY000) at line 1: Illegal mix of collations (utf8mb4_general_ci,COERCIBLE) and (utf8mb4_uca1400_ai_ci,COERCIBLE) for operation '='</div></div><div></div></div><
    <br></div><div>2. Clean bookworm, default locale NONE</div><div># locale</div><div><div>LANG=</div><div>LANGUAGE=en_US:en</div><div>LC_CTYPE="POSIX"</div><div>LC_NUMERIC="POSIX"</div><div>LC_TIME="POSIX"</div><div>LC_COLLATE="POSIX"</div><div>LC_
    MONETARY="POSIX"</div><div>LC_MESSAGES="POSIX"</div><div>LC_PAPER="POSIX"</div><div>LC_NAME="POSIX"</div><div>LC_ADDRESS="POSIX"</div><div>LC_TELEPHONE="POSIX"</div><div>LC_MEASUREMENT="POSIX"</div><div>LC_IDENTIFICATION="POSIX"</div><div>LC_ALL=</div></
    <div># apt install mariadb-server</div><div>…</div><div><div># mariadb -e "SHOW VARIABLES LIKE '%collation%';"</div><div>+----------------------+--------------------+</div><div>| Variable_name &nbsp; &nbsp; &nbsp; &nbsp;| Value &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp;|</div><div>+----------------------+--------------------+</div><div>| collation_connection | latin1_swedish_ci &nbsp;|</div><div>| collation_database &nbsp; | utf8mb4_general_ci |</div><div>| collation_server &nbsp; &nbsp; |
    utf8mb4_general_ci |</div><div>+----------------------+——————————+</div></div><div><div># mariadb -e "SELECT count(*) FROM mysql.user WHERE user='root' and password='' and password_expired='N' and plugin in ('','mysql_native_password',
    'mysql_old_password');"</div><div>+----------+</div><div>| count(*) |</div><div>+----------+</div><div>| &nbsp; &nbsp; &nbsp; &nbsp;0 |</div><div>+----------+</div></div><div># echo deb http://deb.debian.org/debian/ trixie main contrib non-free non-free-
    firmware &gt; /etc/apt/sources.list</div><div># apt update</div><div>…</div><div># apt full-upgrade</div><div>…</div><div># mariadb -e "SHOW VARIABLES LIKE '%collation%’;"</div><div><div># mariadb -e "SHOW VARIABLES LIKE '%collation%';"</div><div>+-
    -------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+</div><div>| Variable_name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| Value &nbsp; &nbsp; &
    nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &
    nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |</div><div>+--------------------------+---------------------------
    --------------------------------------------------------------------------------------------------------------+</div><div>| character_set_collations | utf8mb3=utf8mb3_uca1400_ai_ci,ucs2=ucs2_uca1400_ai_ci,utf8mb4=utf8mb4_uca1400_ai_ci,utf16=utf16_uca1400_
    ai_ci,utf32=utf32_uca1400_ai_ci |</div><div>| collation_connection &nbsp; &nbsp; | latin1_swedish_ci &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &
    nbsp; |</div><div>| collation_database &nbsp; &nbsp; &nbsp; | utf8mb4_uca1400_ai_ci &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &
    nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |</div><div>| collation_
    server &nbsp; &nbsp; &nbsp; &nbsp; | utf8mb4_uca1400_ai_ci &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |</div><div>+--------------------------+------------
    -----------------------------------------------------------------------------------------------------------------------------+</div></div><div># mariadb -e "SELECT count(*) FROM mysql.user WHERE user='root' and password='' and password_expired='N' and
    plugin in ('','mysql_native_password', 'mysql_old_password');”</div><div><div># mariadb -e "SELECT count(*) FROM mysql.user WHERE user='root' and password='' and password_expired='N' and plugin in ('','mysql_native_password', 'mysql_old_password');"</
    <div>+----------+</div><div>| count(*) |</div><div>+----------+</div><div>| &nbsp; &nbsp; &nbsp; &nbsp;0 |</div><div>+----------+</div></div><div><br></div><div>My guess is, this problem has something to do with the difference between utf8mb3 and
    utf8mb4 (i.e. 3-byte UTF8 and 4-byte UTF8).&nbsp;I guess utf8mb3 collation is incompatible with utf8mb4.</div><div><br></div><div>Until MariaDB 11.5, the default character set was latin1, except in Debian, where it was utf8mb3. Thus, in bookworm, MariaDB
    defaults to utf8mb3.</div><div><br></div><div>From 11.6 on, the default character set has been utf8mb4, both in vanilla MariaDB and Debian MariaDB. So trixie defaults to utf8mb4.</div><div><br></div><div>Also, please note this (using the vm in example 1,&
    nbsp;Clean bookworm, default locale C.UTF-8):</div><div><br></div><div><div># LC_CTYPE=C mariadb -e "SELECT count(*) FROM mysql.user WHERE user='root' and password='' and password_expired='N' and plugin in ('','mysql_native_password', 'mysql_old_password'
    );"</div><div>+----------+</div><div>| count(*) |</div><div>+----------+</div><div>| &nbsp; &nbsp; &nbsp; &nbsp;0 |</div><div>+----------+</div><div>root@playground:~# LC_CTYPE=C.UTF-8 mariadb -e "SELECT count(*) FROM mysql.user WHERE user='root' and
    password='' and password_expired='N' and plugin in ('','mysql_native_password', 'mysql_old_password');"</div><div>--------------</div><div>SELECT count(*) FROM mysql.user WHERE user='root' and password='' and password_expired='N' and plugin in ('','mysql_
    native_password', 'mysql_old_password')</div><div>--------------</div><div><br></div><div>ERROR 1267 (HY000) at line 1: Illegal mix of collations (utf8mb4_general_ci,COERCIBLE) and (utf8mb4_uca1400_ai_ci,COERCIBLE) for operation '='</div></div><div><br></
    </div></div><br class="Apple-interchange-newline" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"></body></html>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)