title: MySql error 1215
body: <p>I want to "import" the values from column x (table a) in column a_x (table b).</p>
  
  <p>Why do I get this error: <strong>Error Code: 1215. Cannot add foreign key constraint</strong></p>
  
  <pre><code> CREATE TABLE a(
   id int primary key,
   x int);
  
   CREATE TABLE b(
  
   id int primary key,
   a_x int,
   foreign key (a_x) references a(x));
  </code></pre>