I\'m trying to automate MySQL user creation procedure. I thought of creating a temp file that would contain mysql user creation statements, then I would have call it like this :
try:
GRANT ALL PRIVILEGES ON mytestdatabase.* TO mytestdatabase@localhost IDENTIFIED BY 'PASSWORD';
where PASSWORD is your password (in quotes).