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

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Major Major
    • 2.0.0rc1
    • 1.9.9 (beta)
    • 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?

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

              Created:
              Updated:
              Resolved: