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

Mysql upgrade failed from 4.0.16 to 4.4.4

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Commercial support required
    • Icon: Trivial Trivial
    • None
    • 4.0.16
    • None
    • None
    • Centos 7 x64

      Steps to reproduce:

      1. Upgrade rpm to 4.4.4
      2. Start zabbix-server
      3. Problem in log: Can't DROP 'c_dchecks_1'; check that column/key exists [alter table dchecks drop foreign key c_dchecks_1]

      Result:
      See log file:

      current database version (mandatory/optional): 04000000/04000004
      required mandatory version: 04040000
      starting automatic database upgrade
      completed 1% of database upgrade
      completed 2% of database upgrade
      completed 3% of database upgrade
      completed 4% of database upgrade
      completed 5% of database upgrade
      completed 7% of database upgrade
      completed 8% of database upgrade
      completed 9% of database upgrade
      completed 10% of database upgrade
      completed 11% of database upgrade
      completed 13% of database upgrade
      completed 14% of database upgrade
      completed 15% of database upgrade
      completed 16% of database upgrade
      completed 17% of database upgrade
      completed 19% of database upgrade
      completed 20% of database upgrade
      completed 21% of database upgrade
      [Z3005] query failed: [1091] Can't DROP 'c_dchecks_1'; check that column/key exists [alter table dchecks drop foreign key c_dchecks_1]

      Tried in mysql:

      ALTER TABLE `zabbix`.`dchecks` ADD CONSTRAINT `c_dchecks_1` FOREIGN KEY (`druleid`) REFERENCES `zabbix`.`drules` (`druleid`) ON DELETE CASCADE ON UPDATE RESTRICT;

      Error occured:

      ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`zabbix`.`#sql-b3e_c3fd`, CONSTRAINT `c_dchecks_1` FOREIGN KEY (`druleid`) REFERENCES `drules` (`druleid`) ON DELETE CASCADE ON UPDATE RESTRICT)

            zux Edgars Melveris
            KonsT Konst
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: