Ok, I guess this is what you want to do:
delimiter $$
DROP TRIGGER IF EXISTS trg_check_bi$$
CREATE TRIGGER trg_check_bi BEFORE INSERT ON mytable
FOR EACH ROW
BEGIN
IF(
(NEW.column1 IS NULL AND NEW.column2 IS NULL) ||
(NEW.column2 IS NOT NULL AND NEW.column1 IS NOT NULL)
)
THEN
SIGNAL SQLSTATE '44000'
SET MESSAGE_TEXT = 'check constraint failed';
END IF;
END$$
delimiter ;
Basically, this trigger checks values before insert, and throws user defined error. You should do the same with BEFORE UPDATE trigger. I hope this helps.
Here's the SQLFiddle, just add value for column2 in insert statement (can't save fiddle that fails :))