K-1246: Database connection does not support 4-byte UTF-8



  • Hello Forum,
    I switched from mysql to mariadb 10.2.26 on CentOS 6, but I still get this error:

    Sat Aug  3 22:55:40 2019: [notice ] K-1246: Database connection does not support 4-byte UTF-8. Going for 3-byte UTF-8. The content of some mails may not be representable.
    
    

    kopano-dbadm usmp was running, with the same Error.
    My my.cnf:

    [client]
    default-character-set=utf8mb4
    
    [mysqld]
    character-set-server=utf8mb4
    character_set_client=utf8mb4
    
    

    THX



  • Hi,
    can you please paste the result of this query:

    SHOW GLOBAL VARIABLES WHERE Variable_name LIKE ‘character_set_%’ OR Variable_name LIKE ‘collation%’;

    Check this out:
    https://scottlinux.com/2017/03/04/mysql-mariadb-set-character-set-and-collation-to-utf8/

    regards
    Andreas



  • This is the output:

    +--------------------------+------------------------------+
    | 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     | utf8                         |
    | character_sets_dir       | /opt/mariadb/share/charsets/ |
    | collation_connection     | utf8mb4_general_ci           |
    | collation_database       | utf8mb4_general_ci           |
    | collation_server         | utf8mb4_general_ci           |
    +--------------------------+------------------------------+
    
    


  • Maybe in the my.cnf the parameter
    skip-character-set-client-handshake
    helps.
    Your output looks good, same as mine.



  • After I insert skip-character-set-client-handshake in my.cnf I have the same error.


  • Kopano

    @yythoss said in K-1246: Database connection does not support 4-byte UTF-8:

    I switched from mysql to mariadb 10.2.26 on CentOS 6, but I still get this error:

    How did you do that? MySQL or MariaDB are client and server. So if you only switched the server (e.g. by installing it from a third party repo on CentOS 6) but still use the system’s mysql client library (which might not support utf8mb4) that is what causes your issue.

    Support for utf8mb4 was introduced in MySQL 5.5.3 (released in 2010-03-24) where CentOS 6 comes with MySQL 5.1(?). If you use supported Kopano builds for CentOS 6, those are linked with libmysqlclient.so.16 which comes from mysqlclient16-5.1.59-2 package and thus does not support utf8mb4 on that platform (thus the warning is logged).



  • Ok, I think that is my problem.
    I only change mariadb Server and use supported kopano centos6 rpm‘s.
    So I must accept this warning.

    THX


Log in to reply