title: "IDENTIFIED BY 'password'" in MySQL
body: <p>I often see in many MySQL tutorials that people use command <code>IDENTIFIED BY 'password'</code> both during user creation and granting him privileges. </p>
  
  <p>For example:</p>
  
  <pre><code>CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
  GRANT ALL PRIVILEGES ON database.* TO 'username'@'localhost' IDENTIFIED BY 'password';
  </code></pre>
  
  <p>I tried using <code>GRANT</code> without <code>IDENTIFIED BY</code> and it works.<br>
  Can somebody explain me why it is used twice? Could there be other password for specific privileges?</p>