2 Repairing Zabbix database character set and collation

    MySQL/MariaDB

    1. Check the database character set and collation.

    For example:

    Or:

    1. +--------------------------+----------------------+
    2. | @@character_set_database | @@collation_database |
    3. +--------------------------+----------------------+

    2. Stop Zabbix.

    3. Create a backup copy of the database!

    4. Fix the character set and collation on database level:

    1. mysql> SELECT @@character_set_database, @@collation_database;
    2. +--------------------------+----------------------+
    3. | @@character_set_database | @@collation_database |
    4. +--------------------------+----------------------+
    5. +--------------------------+----------------------+

    5. Load the to fix character set and collation on table and column level:

    6. Execute the script:

    1. SET @ZABBIX_DATABASE = '<your DB name>';
    2. If MariaDB set innodb_strict_mode = OFF;
    3. CALL zbx_convert_utf8();

    Please note that ‘utf8mb4’ is expected to consume slightly more disk space.

    8. Start Zabbix.