Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-4693

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

    XMLWordPrintable

    Details

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

      Description

      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?

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: