Delete trigger mysql on another table
You need to change the delimter to $$ and then back to ;:

DELIMITER $$
CREATE TRIGGER `before_delete`
BEFORE DELETE ON `persons`
FOR EACH ROW
BEGIN
  DELETE FROM ldap_entries WHERE ldap_entries.keyval = OLD.id 
END $$
DELIMITER ;