title: Can't create FOREIGN KEY CONSTRAINT in MySQL
body: <p>I created my MySQL database using phpMyAdmin 3.5.8.1deb1 in Ubuntu.</p>
  
  <p>Instead of that all my tables are InnoDB, I can't add a foreign key, and this is an example:</p>
  
  <pre><code>ALTER TABLE element ADD CONSTRAINT FK_element_id_user FOREIGN KEY (id_user) REFERENCES user(id) ON DELETE SET NULL ON UPDATE CASCADE;
  </code></pre>
  
  <p>When I run this script I get this error : </p>
  
  <blockquote>
    <p>#1005 - Can't create table 'tpw.#sql-4d8_e2' (errno: 150) (Details...)</p>
  </blockquote>
  
  <p>When I click on details I get this :</p>
  
  <blockquote>
    <p>InnoDB  Documentation Supports transactions, row-level locking, and foreign keys</p>
  </blockquote>
  
  <p>I tried to add the FK manually in the relation view</p>