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 :
I opened phpMYAdmin and went to the the users tab, found the user i was trying to connect with clicked Edit Privileges, scrolled down to the Change Login Information / Copy User section and choose Any host for the Host option, it was set to local. When I clicked the Go button, it generated a script similar to the ones listed here.
GRANT ALL PRIVILEGES ON * . * TO 'james'@'%' IDENTIFIED BY PASSWORD '*780E1D13F1C7713F341A117499C6D8644464C4CF' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;