Foreign Key issues when restoring db
I think there might me some orphan data in your civicrm_activity table. Can you run the below query to check if you get any result?

SELECT * FROM `civicrm_activity` ca 
LEFT JOIN civicrm_campaign cc ON cc.id = ca.campaign_id
WHERE ca.campaign_id IS NOT NULL AND cc.id IS NULL;


If you get result then probably you will need to delete this activity or make campaign_id to NULL for all this records.


  Note: Foreign key is important in CiviCRM, Many foreign keys are set to ON CASCADE DELETE or SET NULL. So its possible you might end up more orphan data in your database if you disable them which may have problem while upgrading CiviCRM in future.


You can use below query to either update the civicrm_activity.campaign_id or delete campaign activities

UPDATE `civicrm_activity` ca 
LEFT JOIN civicrm_campaign cc ON cc.id = ca.campaign_id
SET ca.campaign_id = NULL
WHERE ca.campaign_id IS NOT NULL AND cc.id IS NULL;

OR

DELETE ca.* FROM `civicrm_activity` ca 
LEFT JOIN civicrm_campaign cc ON cc.id = ca.campaign_id
WHERE ca.campaign_id IS NOT NULL AND cc.id IS NULL;



  Note: Backup your database before you execute above sql.


HTH

Pradeep