Ad Widget

Collapse

zabbix db character set conversion/recommendations

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jaceqp
    Junior Member
    • Mar 2026
    • 14

    #1

    zabbix db character set conversion/recommendations

    Hi there.
    I've just created empty MySQL zabbix DB using
    Code:
    create database zabbix character set utf8mb4 collate utf8mb4_bin;
    then restored DB using sql file from another server (create DB not included in script).
    Code:
    mysql -uroot -p zabbix < /somepath/somefile.sql
    After restoring DB and checking SELECT @@character_set_database, @@collation_database; shows:
    Code:
    MariaDB [zabbix]> SELECT @@character_set_database, @@collation_database;
    +--------------------------+----------------------+
    | @@character_set_database | @@collation_database |
    +--------------------------+----------------------+
    | utf8mb3                  | utf8mb3_bin          |
    +--------------------------+----------------------+
    Seems charset is included in .sql itself. Shall I convert DB to utf8umb4 anyway or leave it as it is?

    Last edited by Jaceqp; 20-03-2026, 11:03.
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4874

    #2
    As it is meant to be utfmb4, then convert it... Or recreate that DB again, but try to find that part of your sql that forced wrong charset and fix it before...

    Comment

    • guntis_liepins
      Member
      • Oct 2025
      • 55

      #3
      When I restore database I always create it beforehand with utf8mb4 utf8mb4_bin. Do not leave it utf8mb3 , it will not work correctly , it is in documentation.

      Comment

      Working...