Ad Widget

Collapse

Zabbix 2.0 Upgrade from 1.8.4

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rastaferraille
    Junior Member
    • Oct 2008
    • 8

    #1

    Zabbix 2.0 Upgrade from 1.8.4

    Hello,

    Running patch.sql in folder /zabbix-2.0.0/upgrades/dbpatches/2.0/mysql with command mysql -Uroot -p zabbix < patch.sql gives me the error :

    ERROR 1175 (HY000) at line 4: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column

    Any idea ?

    Thanks.
  • sieuwe
    Junior Member
    • May 2012
    • 12

    #2
    Originally posted by rastaferraille
    Hello,

    Running patch.sql in folder /zabbix-2.0.0/upgrades/dbpatches/2.0/mysql with command mysql -Uroot -p zabbix < patch.sql gives me the error :

    ERROR 1175 (HY000) at line 4: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column

    Any idea ?

    Thanks.
    I've used "cat patch.sql | mysql -u root -p zabbix" and that worked for me. I only didn't get the front-end patched. I've copied all the files and it's still the old front-end.

    Comment

    • rastaferraille
      Junior Member
      • Oct 2008
      • 8

      #3
      Lucky guy.
      When using --force option, we have thousands of erros listed like this :

      ERROR 1175 (HY000) at line 210: You are using safe update mode and you tried to update a table withut a WHERE that uses a KEY column
      ERROR 1175 (HY000) at line 211: You are using safe update mode and you tried to update a table withut a WHERE that uses a KEY column
      ERROR 1452 (23000) at line 212: Cannot add or update a child row: a foreign key constraint fails (`abbix`.<result 2 when explaining filename '#sql-5b2_3c1c8d'>, CONSTRAINT `c_graphs_1` FOREIGN KEY (templateid`) REFERENCES `graphs` (`graphid`) ON DELETE CASCADE)
      ERROR 1452 (23000) at line 213: Cannot add or update a child row: a foreign key constraint fails (`abbix`.<result 2 when explaining filename '#sql-5b2_3c1c8d'>, CONSTRAINT `c_graphs_2` FOREIGN KEY (ymin_itemid`) REFERENCES `items` (`itemid`))
      ERROR 1452 (23000) at line 214: Cannot add or update a child row: a foreign key constraint fails (`abbix`.<result 2 when explaining filename '#sql-5b2_3c1c8d'>, CONSTRAINT `c_graphs_3` FOREIGN KEY (ymax_itemid`) REFERENCES `items` (`itemid`))
      ERROR 1175 (HY000) at line 227: You are using safe update mode and you tried to update a table withut a WHERE that uses a KEY column

      ...

      Comment

      • sieuwe
        Junior Member
        • May 2012
        • 12

        #4
        Did you try to run it with sudo?

        Comment

        • rastaferraille
          Junior Member
          • Oct 2008
          • 8

          #5
          I am logged as root... :'( From witch version did you do the upgrade ? Maybe I should try to get it by using 1.8.5, 1.8.6 etc. patches ?
          Last edited by rastaferraille; 23-05-2012, 11:48.

          Comment

          • sieuwe
            Junior Member
            • May 2012
            • 12

            #6
            I upgraded from 1.8.12 and had no problems. Maybe you really should do it version by version.

            Comment

            • MikeyManu
              Junior Member
              • May 2012
              • 1

              #7
              So great find!!!If I cant read it at once...What a pity!

              Comment

              • WernerCD
                Member
                • Apr 2011
                • 37

                #8
                Originally posted by rastaferraille
                Hello,

                Running patch.sql in folder /zabbix-2.0.0/upgrades/dbpatches/2.0/mysql with command mysql -Uroot -p zabbix < patch.sql gives me the error :

                ERROR 1175 (HY000) at line 4: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column

                Any idea ?

                Thanks.
                "The quick fix is to add SET SQL_SAFE_UPDATES=0; before your update query."

                SET SQL_SAFE_UPDATES=0;

                Comment

                • WernerCD
                  Member
                  • Apr 2011
                  • 37

                  #9
                  Originally posted by rastaferraille
                  Lucky guy.
                  When using --force option, we have thousands of erros listed like this :
                  ...
                  The errors I had were solved by switching MySQL user from "Zabbix" to "root". Permissions issues were solved because root should have permissions for everything.

                  Maybe my previous post ("SET SQL_SAFE_UPDATES=0;"), plus switching to a "SUPER" mysql user will solve your issues?

                  Comment

                  Working...