I am attempting to upgrade Zabbix Server from 2.2.6 to 2.4.7. I'm running on CentOS 6.7 and used the Zabbix repos for yum to do the upgrade.
The first attempt at upgrading the database, Zabbix complained it couldn't create a foreign key constraint:
I discovered that the engine on the triggers table was MyISAM and trigger_discovery was InnoDB. I altered the triggers table to InnoDB.
Now I get the error:
This server was the primary node in a two-node distributed system. If I query data in the triggers_discovery_tmp table and compare it to the triggers table, it has triggerid's that are not in the triggers table thus preventing the creation of the contraint.
Help!!!
The first attempt at upgrading the database, Zabbix complained it couldn't create a foreign key constraint:
Z3005] query failed: [1005] Can't create table 'zabbix.#sql-dd6_3' (errno: 150) [alter table trigger_discovery add constraint c_trigger_discovery_1 foreign key (triggerid) references triggers (triggerid) on delete cascade]
Now I get the error:
[Z3005] query failed: [1452] Cannot add or update a child row: a foreign key constraint fails (`zabbix`.`trigger_discovery`, CONSTRAINT `c_trigger_discovery_1` FOREIGN KEY (`triggerid`) REFERENCES `triggers` (`triggerid`) ON DELETE CASCADE) [insert into trigger_discovery (select triggerid,parent_triggerid from trigger_discovery_tmp)]
Help!!!
Comment