Hi all,
This is something that I'm guessing will either be a fairly easy workaround or... forget it...
We're upgrading lots 'o things at once. I've got a test instance going to see whether it will be possible to retain our history (understanding that we may find we can't); and on a new server.
We're going from:
CentOS 7 2.4 MySQL (actually running MariaDB, 5.5), to CentOS 7, MySQL (Community, 5.7).
I've:
Installed the new server, set up MySQL, created Zabbix user, populated database with dump from old host, installed Zabbix.
Startup looks okay, until the 19% point, old version detected and new version is correct. "Optional patches were found". Then:
Apr 16 13:44:46 monz zabbix_server[6011]: [Z3005] query failed: [1452] Cannot add or update a child row: a foreign key constraint fails (`zabbix`.`profiles`, CONSTRAINT `c_profiles_1` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`) ON DELETE CASCADE) [update profiles set idx='web.triggers.filter_status',value_int=case when value_int=0 then 0 else -1 end where idx='web.triggers.showdisabled']
Apr 16 13:44:46 monz zabbix_server[6011]: database upgrade failed
One reason why I'm not insisting to myself that this should work is that we had some database... issues a few months ago, including several users inadvertently deleted (including me). Went through a recovery and things have seemed stable since, but I'm wondering whether there might be latent issues with the database structure that are causing this issue.
So, two questions, aside from the obvious "huh"...
1. Keeping in mind we might be somewhat damaged at the source, is there anything I can/should do to that server that might have a positive effect on the upgrade process?
2. If not, on the test server, is there a workaround for this? (I'm presuming that there might be lingering damage, still - but if things are fixable, it would be somewhat preferable from losing history.)
Or, any other comments? I looked to see whether there was a process to ensure the database is "correct", but I hadn't come up with one.
And, of course, I'm happy to tally votes that this is a waste of time. But also interested in any other way to export data (I do know about configuration export) or any ideas to manually update database data or whatever...
Thanks for any help!
This is something that I'm guessing will either be a fairly easy workaround or... forget it...
We're upgrading lots 'o things at once. I've got a test instance going to see whether it will be possible to retain our history (understanding that we may find we can't); and on a new server.
We're going from:
CentOS 7 2.4 MySQL (actually running MariaDB, 5.5), to CentOS 7, MySQL (Community, 5.7).
I've:
Installed the new server, set up MySQL, created Zabbix user, populated database with dump from old host, installed Zabbix.
Startup looks okay, until the 19% point, old version detected and new version is correct. "Optional patches were found". Then:
Apr 16 13:44:46 monz zabbix_server[6011]: [Z3005] query failed: [1452] Cannot add or update a child row: a foreign key constraint fails (`zabbix`.`profiles`, CONSTRAINT `c_profiles_1` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`) ON DELETE CASCADE) [update profiles set idx='web.triggers.filter_status',value_int=case when value_int=0 then 0 else -1 end where idx='web.triggers.showdisabled']
Apr 16 13:44:46 monz zabbix_server[6011]: database upgrade failed
One reason why I'm not insisting to myself that this should work is that we had some database... issues a few months ago, including several users inadvertently deleted (including me). Went through a recovery and things have seemed stable since, but I'm wondering whether there might be latent issues with the database structure that are causing this issue.
So, two questions, aside from the obvious "huh"...
1. Keeping in mind we might be somewhat damaged at the source, is there anything I can/should do to that server that might have a positive effect on the upgrade process?
2. If not, on the test server, is there a workaround for this? (I'm presuming that there might be lingering damage, still - but if things are fixable, it would be somewhat preferable from losing history.)
Or, any other comments? I looked to see whether there was a process to ensure the database is "correct", but I hadn't come up with one.
And, of course, I'm happy to tally votes that this is a waste of time. But also interested in any other way to export data (I do know about configuration export) or any ideas to manually update database data or whatever...
Thanks for any help!