title: Cannot add foreign key constraints, Mysql
body: <p>please could you please tell me what I am doing wrong?
  I have MySQl script but finally I got this </p>
  
  <blockquote>
    <p>Error 1215: Cannot add foreign key constraints</p>
  </blockquote>
  
  <p>Here is code:</p>
  
  <pre><code>   CREATE TABLE IF NOT EXISTS profile_public_data
  (
      idProfile INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
      login VARCHAR(64),
      name VARCHAR(45),
      lastName VARCHAR(45),
      location VARCHAR(45),
      is_active BOOLEAN DEFAULT false,
      age TINYINT,
      photo VARCHAR(45),
      PRIMARY KEY(idProfile)
  );
  
  CREATE TABLE IF NOT EXISTS profile_private_data
  (
      idProfile INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
      CONSTRAINT fk_idProfile 
              FOREIGN KEY(idProfile) 
              REFERENCES `profile_public_data`(idProfile)
                  ON DELETE SET NULL 
                  ON UPDATE SET NULL,
      email VARCHAR(45),
      password VARCHAR(45),
      PRIMARY KEY(idProfile)
  );
  </code></pre>