title: Mysql create trigger if not exist
body: <p>I have a script that creates triggers,
  I would like to run it multiple times and if a trigger already exist it needs to skip the creation part. </p>
  
  <p>Is there a "create if not exist" in mysql triggers?</p>
  
  <p>EDIT:</p>
  
  <p>I tried :</p>
  
  <pre><code>    IF NOT EXISTS ((SELECT TRIGGER_NAME
          FROM information_schema.triggers
          WHERE TRIGGER_SCHEMA = 'xxx_admin' AND TRIGGER_NAME = 'test_AFTER_UPDATE')) 
          THEN
      CREATE DEFINER=`root`@`localhost` TRIGGER `xxx_admin`.`test_AFTER_UPDATE` AFTER UPDATE ON `test` FOR EACH ROW
          BEGIN
          INSERT INTO auditTest 
          select *, now() from test where id = NEW.id;
          END;
    END IF;
  </code></pre>
  
  <p>I get : syntex error " 'IF' is not valid input at this location</p>