I must be missing something.
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.
this fails:
GRANT SELECT ON myDB.* TO 'selectuser'@'localhost'
IDENTIFIED BY hash('sha256', 'salted-myfakelongrandompasswordstring');
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
this passes:
GRANT SELECT ON myDB.* TO 'selectuser'@'localhost'
IDENTIFIED BY 'salted-myfakelongrandompasswordstring';
I checked the phpinfo page and the sha256 hash engine is already enabled.
is there a way to change the default hashing algorithm for mysql, or is the syntax just incorrect on my SQL?