Skip to content

Instantly share code, notes, and snippets.

@emjayess
Created July 27, 2012 14:36
Show Gist options
  • Save emjayess/3188389 to your computer and use it in GitHub Desktop.
Save emjayess/3188389 to your computer and use it in GitHub Desktop.
grant permissions to a user on multiple mysql databases
# grant the following perms to 'w1zk1d' on all localhost db's with a name prefix of 'drupal_' ...
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES, CREATE TEMPORARY TABLES ON `drupal_%`.* TO 'w1zk1d'@'localhost' IDENTIFIED BY 'kick@ss';
@emjayess
Copy link
Author

and optionally
FLUSH PRIVILEGES;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment