I am trying to install Zabbix by following this guide. I ran into the following problems when trying to run data.sql after running scheme.sql successfully
mysql -D zabbix -uzabbix -pPassword < /home/zabbix/zabbix-2.4.5/database/mysql/schema.sql
mysql -D zabbix -uzabbix -pPassword < /home/zabbix/zabbix-2.4.5/database/mysql/data.sql
ERROR 1452 (23000) at line 2989: Cannot add or update a child row: a foreign key constraint fails ('zabbix'.'sysmaps_elements', CONSTRAINT 'c_sysmaps_elements_2' FOREIGN KEY ('iconid_off') REFERENCES 'images' ('imageid'))
I cannot figure out why I would not be able to add or update a child row , it looks perfectly fine to me.
The scripts can be downloaded from here
iconid_off
in all rows being inserted tosysmaps_elements
already exists as a value forimageid
inimages
? The script should be inserting in that order. What does line 2989 of the script contain?