Ad Widget

Collapse

Problem with to migration another server and upgrade 6.2.0 to 6.4.15

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • abasko
    Junior Member
    • Jan 2022
    • 2

    #1

    Problem with to migration another server and upgrade 6.2.0 to 6.4.15

    Hello everyone,

    I am currently running Zabbix 6.2.0 on CentOS 8, and I want to migrate it to Ubuntu 24.04 and upgrade it to Zabbix 6.4.15. Following the steps from these pages:
    - [Best Monitoring Tools - Upgrade Zabbix to the latest version](https://bestmonitoringtools.com/upgr...atest-version/)
    - [Zabbix Documentation - Installation/Upgrade/Packages/Debian Ubuntu](https://www.zabbix.com/documentation.../debian_ubuntu)

    I did the following steps:
    1. Installed a clean Ubuntu 24.04.
    2. Installed Zabbix 6.4.15 on it.
    3. Copied the database and configuration files from the working system.
    4. Restarted and got an error.

    And I decided to try different way

    So, I installed a clean Zabbix 6.2.0 on a clean Ubuntu 22.04. I ran it successfully and took backups of the configuration files and the database.

    Then, I only transferred the database from the production environment to test database. It worked with real data successfully again

    I upgraded Zabbix to 6.4.15, but now I am getting the following error:

    Code:
    ```
    [Z3005] query failed: [1449] The user specified as a definer ('zabbix_srv'@'localhost') does not exist [update hosts set name_upper=upper(name)] database upgrade failed on patch 06030066, exiting in 10 seconds
    
    ```
    and Zabbix is not working.

    zabbix_srv user is production sites mysql user but in test enviroment mysql user is 'zabbix'

    However, there is no such user specified in /etc/zabbix/zabbix_server.conf.
    Here is the content of /etc/zabbix/zabbix_server.conf:

    Code:
    ```
    # Mandatory: yes
    # Default:
    # DBName=
    
    DBName=zabbix
    
    ### Option: DBSchema
    # Schema name. Used for PostgreSQL.
    #
    # Mandatory: no
    # Default:
    # DBSchema=
    
    ### Option: DBUser
    # Database user.
    #
    # Mandatory: no
    # Default:
    # DBUser=
    
    DBUser=zabbix
    
    ### Option: DBPassword
    # Database password.
    # Comment this line if no password is used.
    #
    # Mandatory: no
    # Default:
    
    DBPassword=password
    
    
    ```
    I think zabbix gets database connection credentials from different location but couldn't find them ?

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

    #2
    I'm not a DBA and may talk sh...here... but when you transferred the DB, then maybe some db or table owners got transferred too and should be changed according to your test env?
    https://stackoverflow.com/questions/...does-not-exist

    Comment

    • Avinasha
      Member
      • Jan 2018
      • 40

      #3
      Create the definer user and set same permissions as before in the prod DB then flush privileges

      Comment

      • abasko
        Junior Member
        • Jan 2022
        • 2

        #4

        Yes, I did what you said. I also opened same prod mysql user and gave same permissions in the test environment. And yes it worked

        Thanks your advice

        Comment

        Working...