When setting up a DB I normally create a user with:
CREATE USER myuser@localhost IDENTIFIED BY 'pa$$w0rd';
and then give the user some permissions on a DB:
GRANT SELECT, INSERT, UPDATE ON dbname.* TO 'myuser'@'localhost' IDENTIFIED BY 'pa$$w0rd';
I see this two command sequence all over the place as the way to do this. However, I notice if I skip the CREATE USER command and start with GRANT the user seems to be created automatically and work fine.
Is there a reason why CREATE USER should still be used before GRANT? Or is it just an old convention maybe for backwards compatibility?