Ad Widget

Collapse

Upgrade and import MySQL database fault

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • markclark
    Member
    • Apr 2011
    • 70

    #1

    Upgrade and import MySQL database fault

    Hi all,

    Might be something simple. Installed a fresh copy of Zabbix 2.2.2 on an Ubuntu server and set it all up. Works fine. When i try import the existing MySQL database and then go back into the Zabbix front end i get loads of errors around the existing data.

    Something obvious I've missed here? Get a lot of the following (without pasting the whole code)

    Error in query:
    Undefined index:
    Undefined offset:

    Thanks
    Mark
  • markclark
    Member
    • Apr 2011
    • 70

    #2
    Ive tried exporting the existing hosts from the old server, thought that might be it. When i try import it into the new server i get the following:

    PHP Code:
    Error in query [SELECT   COUNT(DISTINCT h.hostid) AS rowscount FROM hosts h WHERE h.flags IN (0,4) AND h.hostid='10118' AND h.status IN (0,1,3)] [Unknown column 'h.flags' in 'where clause']
    You do not have permission to perform this operation

    Comment

    • jvalenzani
      Member
      Zabbix Certified Specialist
      • Sep 2010
      • 53

      #3
      How did you export the MySQL data? Did you use mysqldump? Did you create the BD user with privileges on the database? Are you migrating from the same version (2.2.2)?

      Comment

      • aib
        Senior Member
        • Jan 2014
        • 1615

        #4
        FYI: after version 2.2 the format of Database was changed.
        You cannot import data from DB version 2.0 into DB version 2.2.

        Sorry.
        You have to convert the old DB to a new format.
        Sincerely yours,
        Aleksey

        Comment

        • markclark
          Member
          • Apr 2011
          • 70

          #5
          Hi all,

          jvalenzani
          How did you export the MySQL data? Did you use mysqldump? Did you create the BD user with privileges on the database? Are you migrating from the same version (2.2.2)? -
          All yes apart from migrating from 2.0.5 to 2.2


          aib
          FYI: after version 2.2 the format of Database was changed.
          You cannot import data from DB version 2.0 into DB version 2.2.
          Sorry.
          You have to convert the old DB to a new format.
          Whats the best way to format it? I did the installation, imported the database and then ran the SQL create schema.

          Comment

          • jvalenzani
            Member
            Zabbix Certified Specialist
            • Sep 2010
            • 53

            #6
            As aib said, 2.2 schema is not compatible with 2.0. If you want to convert data you need to do an upgrade instead of a clean 2.2 instalation.
            The 2.2 server auto-detects the 2.0 schema and performs all the conversions to the tables.

            Comment

            • markclark
              Member
              • Apr 2011
              • 70

              #7
              Hi jvalenzani,

              Hmm thats a bit of a pain. Was hoping to rebuild a fresh instance of Ubuntu Server on a VM then migrate the SQL DB across. Dont want to take the old Ubuntu Server want a fresh start with the existing DB.

              Suppose i could upgrade, then export the DB and then import into the new installation then that should work id imagine...

              Comment

              • starfish
                Junior Member
                • Nov 2011
                • 6

                #8
                I am having the same problem, upgrading a to a newer debian version and upgrading zabbix to 2.2 - the old mysqldump of the 2.0.6 zabbix does not work. My problem is that I cannot downgrade zabbix to do the intended way of db conversion. Running armhf binaries its not easy or not possible to downgrade. can somebody point me to the solution either how to downgrade or how to straight convert the db ?

                Comment

                Working...