Skip to content

Instantly share code, notes, and snippets.

@rotexdegba
Last active December 31, 2015 18:09
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 rotexdegba/8025451 to your computer and use it in GitHub Desktop.
Save rotexdegba/8025451 to your computer and use it in GitHub Desktop.
MySQL commands to create users via the mysql command line utility
# mysql --user=root --password=somepassword #connect to mysql as root or any other user that has the appropriate user creation permissions
# mysql> CREATE USER 'rotimi'@'localhost' IDENTIFIED BY 'password';
# mysql> GRANT ALL PRIVILEGES ON *.* TO 'rotimi'@'localhost' WITH GRANT OPTION;
# mysql> CREATE USER 'rotimi'@'%' IDENTIFIED BY 'password';
# mysql> GRANT ALL PRIVILEGES ON *.* TO 'rotimi'@'%' WITH GRANT OPTION;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment