Skip to content

Instantly share code, notes, and snippets.

@deviousway
Last active March 9, 2018 10:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deviousway/7a17be5e6512f2ca84b2bc191a6767fc to your computer and use it in GitHub Desktop.
Save deviousway/7a17be5e6512f2ca84b2bc191a6767fc to your computer and use it in GitHub Desktop.
create_mysl_db_and_user
CREATE database $databasename;
CREATE USER '$newuser'@'localhost' IDENTIFIED BY '$password';
GRANT ALL PRIVILEGES ON $databasename.* TO '$newuser'@'localhost';
or to all
GRANT ALL PRIVILEGES ON *.* TO '$newuser'@'localhost';
Reset pass for mysql user
ALTER USER '$user'@'localhost' IDENTIFIED BY '$password' ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment