title: how do I create a mySQL user with hash('sha256', $salt . $password)?
body: <p>I must be missing something.</p>
  
  <p>I want to set up a database user account for select-only transactions but mysql is not letting me choose the hash method for a password on creating a user account.</p>
  
  <p>this fails:</p>
  
  <pre><code>GRANT SELECT ON myDB.* TO 'selectuser'@'localhost' 
  IDENTIFIED BY hash('sha256', 'salted-myfakelongrandompasswordstring');
  </code></pre>
  
  <p>ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'hash('sha256', 'salted-myfakelongrandompasswordstring')' at line 1</p>
  
  <p>this passes:</p>
  
  <pre><code>GRANT SELECT ON myDB.* TO 'selectuser'@'localhost' 
  IDENTIFIED BY 'salted-myfakelongrandompasswordstring';
  </code></pre>
  
  <p>I checked the phpinfo page and the sha256 hash engine is already enabled.</p>
  
  <p>is there a way to change the default hashing algorithm for mysql, or is the syntax just incorrect on my SQL?</p>