title: MySQL syntax error - dropping foreign key if exist
body: <p>The following ALTER statement is working fine on my local (xamp), but on my server (Debian), I'm getting this error:</p>
  
  <pre><code>You have an error in your SQL syntax; check the manual that 
  corresponds to your MySQL server version for the right syntax to use near 
  'IF EXISTS `foreign_key1`' at line 1 
  </code></pre>
  
  <p>This is the query:</p>
  
  <pre><code>ALTER TABLE `table` DROP FOREIGN KEY IF EXISTS `foreign_key1`;
  </code></pre>
  
  <p>How do I fix the error?</p>