title: Foreign keys must be Index in mySQL?
body: <p>I've just created my first mySQL table on my own (other than using Joomla, Wordpress, etc.) and I am MS SQL developer for years but normally I can easily create a foreign key in MS SQL but I came across a difficulty or lack of knowledge here.</p>
  
  <p>Here is my tables :</p>
  
  <p><strong>users</strong></p>
  
  <ol>
  <li>user_id int primary auto_increment</li>
  <li>username varchar(20)</li>
  <li>password varchar(20)</li>
  </ol>
  
  <p><strong>posts</strong></p>
  
  <ol>
  <li>post_id in primary auto_increment</li>
  <li>title varchar(100)</li>
  <li>message text</li>
  <li>user_id int</li>
  </ol>
  
  <p>When I try to add a foreign key to users which refers to <code>posts-&gt;user_id</code>, I cannot see the <code>posts-&gt;user_id</code> option in the option list Relation_view window on mySQL panel.</p>
  
  <p>I am wondering whether I should define <code>posts-&gt;user_id</code> as <code>Index</code> or something? If so, why?</p>