[ZBXNEXT-7694] Incorrect charset for MySQL database "utf8mb3" instead "UTF8" Created: 2022 May 10  Updated: 2024 Apr 10  Resolved: 2022 Jun 12

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Frontend (F), Server (S)
Affects Version/s: 4.0.41rc1
Fix Version/s: 4.0.42rc1, 6.2 (plan)

Type: Change Request Priority: Trivial
Reporter: Natalja Romancaka Assignee: Alexander Vladishev
Resolution: Fixed Votes: 0
Labels: mysql
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File utf8.png    
Issue Links:
Sub-task
depends on ZBX-21301 Error message cannot set MySQL charac... Closed
Team: Team C
Sprint: Sprint 88 (May 2022), Sprint 89 (Jun 2022)
Story Points: 0.25

 Description   

Start from MySQL 8.0.29 version changed charset support

https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-29.html
Important Note: The server now uses utf8mb3 rather than utf8 in the following cases:

  • In the output of SHOW SQL statements (SHOW CREATE TABLE, SHOW CREATE VIEW, SHOW CREATE DATABASE)
  • When reporting invalid strings.

Zabbix 4.0 supports only this charset:

// Default db and field character set
define('ZBX_DB_DEFAULT_CHARSET', 'UTF8');
define('ZBX_DB_MYSQL_DEFAULT_COLLATION', 'utf8_bin');

Steps to reproduce:

  1. Install MySQL 8.0.29+ version
  2. Create database
    create database zabbix character set utf8 collate utf8_bin;
  3. Connect to database in user interface

Result: Cannot connect to the database. Incorrect default charset for Zabbix database: "utf8mb3" instead "UTF8".
Expected result: need to add utf8mb3 support



 Comments   
Comment by Alexander Vladishev [ 2022 Jun 12 ]

Available in:

Generated at Fri May 02 07:46:34 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.