- GRANT with IDENTIFIED BY is not recommended anymore by MySQL. Use separate
CREATE and GRANT statements.
- Ensure that CREATE USER only runs when the user does not exist.
- Ensure that database password is always updated with a separate ALTER USER
statement.
- Factor out database querying into a separate method.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>