Skip to content

Instantly share code, notes, and snippets.

@szeidler
Created March 6, 2017 16:31
Show Gist options
  • Save szeidler/93d15c189cf6ea7135e2d04dfa1029b0 to your computer and use it in GitHub Desktop.
Save szeidler/93d15c189cf6ea7135e2d04dfa1029b0 to your computer and use it in GitHub Desktop.
MySQL: Create User and grant priv to wildcard DB
mysql -u USERNAME -p DATABASENAME < file.sql
CREATE USER 'some_user'@'localhost' IDENTIFIED BY 'some_pass';
GRANT ALL ON `some_user\_%`.* to `some_user`@`localhost`;
/** Change Password */
SET PASSWORD FOR 'jeffrey'@'localhost' = PASSWORD('mypass');
/** SOURCE: http://dev.mysql.com/doc/refman/5.7/en/assigning-passwords.html */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment