Ad Widget

Collapse

Zabbix database version problem

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • alexswamp
    Junior Member
    • Oct 2021
    • 11

    #1

    Zabbix database version problem

    Hello everyone!

    I just run apt update & upgrade from CLI under my zabbix server (ubuntu 22.04). And after i got this error message.

    WEB output:
    Code:
    Database error[LIST][*]The Zabbix database version does not match current requirements. Your database version: 6000000. Required version: 6040000. Please contact your system administrator.[/LIST]
    ​
    CLI output:
    Code:
    root@srv05zabbix:/home/it# zabbix_server --version
    zabbix_server (Zabbix) 6.0.14
    Revision 3f184b456c7 8 March 2023, compilation time: Mar  8 2023 12:23:57
    
    Copyright (C) 2023 Zabbix SIA
    License GPLv2+: GNU GPL version 2 or later <https://www.gnu.org/licenses/>.
    This is free software: you are free to change and redistribute it according to
    the license. There is NO WARRANTY, to the extent permitted by law.
    
    This product includes software developed by the OpenSSL Project
    for use in the OpenSSL Toolkit (http://www.openssl.org/).
    
    Compiled with OpenSSL 1.1.1f  31 Mar 2020
    Running with OpenSSL 1.1.1f  31 Mar 2020
    root@srv05zabbix:/home/it# apt list --installed | grep zabbix
    
    WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
    
    zabbix-agent/now 1:6.0.14-1+ubuntu20.04 amd64 [installed,local]
    zabbix-apache-conf/now 1:6.4.1-1+ubuntu22.04 all [installed,local]
    zabbix-frontend-php/now 1:6.4.1-1+ubuntu22.04 all [installed,local]
    zabbix-release/now 1:6.4-1+ubuntu22.04 all [installed,local]
    zabbix-server-mysql/now 1:6.0.14-1+ubuntu20.04 amd64 [installed,local]
    zabbix-sql-scripts/now 1:6.4.1-1+ubuntu22.04 all [installed,local]
    root@srv05zabbix:/home/it#​
    Code:
    root@srv05zabbix:/home/it# cat /var/log/zabbix/zabbix_server.log | grep database
    1241526:20230411:081921.973 current database version (mandatory/optional): 06000000/06000018
    1242064:20230411:083727.187 current database version (mandatory/optional): 06000000/06000018
      1072:20230411:084304.136 current database version (mandatory/optional): 06000000/06000018
      2044:20230411:085113.011 current database version (mandatory/optional): 06000000/06000018
    root@srv05zabbix:/home/it# cat /var/log/zabbix/zabbix_server.log | grep database
    1241526:20230411:081921.973 current database version (mandatory/optional): 06000000/06000018
    1242064:20230411:083727.187 current database version (mandatory/optional): 06000000/06000018
      1072:20230411:084304.136 current database version (mandatory/optional): 06000000/06000018
      2044:20230411:085113.011 current database version (mandatory/optional): 06000000/06000018
    root@srv05zabbix:/home/it# service mysql status
    ● mysql.service - MySQL Community Server
         Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
         Active: active (running) since Tue 2023-04-11 08:43:03 UTC; 16min ago
        Process: 733 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
       Main PID: 875 (mysqld)
         Status: "Server is operational"
          Tasks: 67 (limit: 4608)
         Memory: 714.3M
         CGroup: /system.slice/mysql.service
                 └─875 /usr/sbin/mysqld
    
    Apr 11 08:42:57 srv05zabbix systemd[1]: Starting MySQL Community Server...
    Apr 11 08:43:03 srv05zabbix systemd[1]: Started MySQL Community Server.
    root@srv05zabbix:/home/it#​

    I tried to repair with that document (2 Debian/Ubuntu (zabbix.com)) but it didn't help me.​
    Last edited by alexswamp; 11-04-2023, 11:00.
  • Answer selected by tim.mooney at 11-04-2023, 20:26.
    alexswamp
    Junior Member
    • Oct 2021
    • 11

    Originally posted by cyber
    Why your server package shows 6.0.14 ? (zabbix-server-mysql/now 1:6.0.14-1+ubuntu20.04 amd64 [installed,local]) if rest of them are for 6.4.1
    Install correct version..
    Yes i saw it. When I try to update it, it says that it is already on the latest version. I found the solutions. I need to set the correct Zabbix repository and after i can upgrade every package the correct version. I also need to configure on my mysql server. And need super right for my mysql user. After i can upgrade all package correct.

    On MYSQL:
    Code:
    UPDATE mysql.user SET Super_Priv='Y' WHERE user='zabbix_username' AND host='%';
    SET GLOBAL log_bin_trust_function_creators = 1;
    On CLI:
    Code:
    wget https://repo.zabbix.com/zabbix/6.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.4-1+ubuntu20.04_all.deb
    dpkg -i zabbix-release_6.4-1+ubuntu20.04_all.deb
    apt update

    After update i need set back my MYSQL:
    Code:
    UPDATE mysql.user SET Super_Priv='N' WHERE user='zabbix_username' AND host='%';
    SET GLOBAL log_bin_trust_function_creators = 0;

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4807

      #2
      Why your server package shows 6.0.14 ? (zabbix-server-mysql/now 1:6.0.14-1+ubuntu20.04 amd64 [installed,local]) if rest of them are for 6.4.1
      Install correct version..

      Comment

      • alexswamp
        Junior Member
        • Oct 2021
        • 11

        #3
        Originally posted by cyber
        Why your server package shows 6.0.14 ? (zabbix-server-mysql/now 1:6.0.14-1+ubuntu20.04 amd64 [installed,local]) if rest of them are for 6.4.1
        Install correct version..
        Yes i saw it. When I try to update it, it says that it is already on the latest version. I found the solutions. I need to set the correct Zabbix repository and after i can upgrade every package the correct version. I also need to configure on my mysql server. And need super right for my mysql user. After i can upgrade all package correct.

        On MYSQL:
        Code:
        UPDATE mysql.user SET Super_Priv='Y' WHERE user='zabbix_username' AND host='%';
        SET GLOBAL log_bin_trust_function_creators = 1;
        On CLI:
        Code:
        wget https://repo.zabbix.com/zabbix/6.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.4-1+ubuntu20.04_all.deb
        dpkg -i zabbix-release_6.4-1+ubuntu20.04_all.deb
        apt update

        After update i need set back my MYSQL:
        Code:
        UPDATE mysql.user SET Super_Priv='N' WHERE user='zabbix_username' AND host='%';
        SET GLOBAL log_bin_trust_function_creators = 0;

        Comment

        • hakanozanlagan
          Member
          • Nov 2021
          • 35

          #4
          adding below parameter in zabbix_server.conf solved my problem.
          AllowUnsupportedDBVersions=1

          Comment

          Working...