mysql update removed utf8?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DigiState
    Junior Member
    Forum Explorer
    • Feb 2024
    • 20

    #1

    mysql update removed utf8?

    Hi all.

    Ran updates this morning. All of a sudden a client noticed their site has issues connecting to the database, as utf8 (suddenly) isn't supported anymore. So I looked in the history and the only thing I think could relate to this is the update of alt-php73-mysql-meta-3-13.el7.noarch. No other packages both contain php(7.3) and mysql in their name. However, yum history does say

    Code:
     114 ERROR   : mysqli.so is not found. Please install alt-php84-mariadb101 package
     115 ERROR   : mysqli.so is not found. Please install alt-php84-mariadb5.1 package
     116 ERROR   : mysqli.so is not found. Please install alt-php84-mysql5.0 package
    The problem was circumvented by forcing the site to use utf8mb3. When I checked mariadb for encoding I noticed

    Code:
    MariaDB [(none)]> show variables like 'char%'; show variables like 'collation%';
    +--------------------------+----------------------------+
    | Variable_name            | Value                      |
    +--------------------------+----------------------------+
    | character_set_client     | utf8mb3                    |
    | character_set_connection | utf8mb3                    |
    | character_set_database   | latin1                     |
    | character_set_filesystem | binary                     |
    | character_set_results    | utf8mb3                    |
    | character_set_server     | latin1                     |
    | character_set_system     | utf8mb3                    |
    | character_sets_dir       | /usr/share/mysql/charsets/ |
    +--------------------------+----------------------------+
    8 rows in set (0.001 sec)
    
    +----------------------+--------------------+
    | Variable_name        | Value              |
    +----------------------+--------------------+
    | collation_connection | utf8mb3_general_ci |
    | collation_database   | latin1_swedish_ci  |
    | collation_server     | latin1_swedish_ci  |
    +----------------------+--------------------+
    3 rows in set (0.002 sec)
    
    ​
    But this changing surely can't be the cause, because there was no update to mariadb. Other servers we have (not running CL, and certainly not all) just use utf8
    Code:
    MariaDB [(none)]> show variables like 'char%';
    +--------------------------+----------------------------+
    | Variable_name            | Value                      |
    +--------------------------+----------------------------+
    | character_set_client     | utf8                       |
    | character_set_connection | utf8                       |
    | character_set_database   | latin1                     |
    | character_set_filesystem | binary                     |
    | character_set_results    | utf8                       |
    | character_set_server     | latin1                     |
    | character_set_system     | utf8                       |
    | character_sets_dir       | /usr/share/mysql/charsets/ |
    +--------------------------+----------------------------+
    8 rows in set (0.005 sec)
    
    ​
    Can anyone explain this change?
  • bogdan.sh
    Administrator
    • Nov 2016
    • 1219

    #2
    Historically, MySQL's utf8 character set only supported a maximum of 3 bytes per character, which means it couldn't store all Unicode characters. This is what utf8mb3 refers to and usually is an alias to utf8.

    What are the MariaDB versions onthis server and another one? Do you have the 'old_mode' option set somewhere in /etc/my* files?

    Interesting read: https://dev.mysql.com/doc/refman/8.4...e-utf8mb3.html , likely php-mysql-meta is related somwhow.

    Comment

    • DigiState
      Junior Member
      Forum Explorer
      • Feb 2024
      • 20

      #3
      The version of MariaDB is 10.6.19. old_mode is not an option I know, and it's not enabled either. Other servers that we have from about the same time that are not running CL did not have this change enforced.

      Comment

      Working...