mysql database upgrade scripts cause: Cannot add or update a child row: a foreign key constraint fails...

XMLWordPrintable

    • Type: Incident report
    • Resolution: Fixed
    • Priority: Major
    • 2.0.0rc1
    • Affects Version/s: 1.9.9 (beta)
    • Component/s: Installation (I)
    • None

      I am not sure if this kind of issue fits bug tracker.

      I am upgrading mysql database from zabbix 1.8.10 to 1.9.9 with script patch.sql. My mysql database is size about 50GB.

      During an upgrade I get error:
      ERROR 1452 (23000) at line 886: Cannot add or update a child row: a foreign key constraint fails (`zabbix`.<result 2 when explaining filename '#sql-2621_6'>, CONSTRAINT `c_hosts_2` FOREIGN KEY (`maintenanceid`) REFERENCES `maintenances` (`maintenanceid`))

      My second try:
      ERROR 1452 (23000) at line 886: Cannot add or update a child row: a foreign key constraint fails (`zabbix`.<result 2 when explaining filename '#sql-396b_2'>, CONSTRAINT `c_hosts_2` FOREIGN KEY (`maintenanceid`) REFERENCES `maintenances` (`maintenanceid`))

      Temporary directory for mysql is about 65G free.

      Any sugestion how can I workaround this issue and convert all database?

            Assignee:
            Unassigned
            Reporter:
            Robert Jerzak
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: