CREATE TRIGGER before_update ON my_table FOR EACH ROW BEGIN INSERT INTO audit_log (username, change_time, old_value, new_value) VALUES (USER(), NOW(), OLD.data_column, NEW.data_column); END;