Quantcast
Viewing latest article 8
Browse Latest Browse All 47

SQL Error 1452 : Cannot add or update a child row: a foreign key constraint fails

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.sqlmysql -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


Viewing latest article 8
Browse Latest Browse All 47

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>