Skip to content

Instantly share code, notes, and snippets.

@nerijunior
Last active March 23, 2019 18:17
Show Gist options
  • Save nerijunior/fe497071d1abb24e8ffd38880f25c6d8 to your computer and use it in GitHub Desktop.
Save nerijunior/fe497071d1abb24e8ffd38880f25c6d8 to your computer and use it in GitHub Desktop.
create mysql user and grant
CREATE DATABASE mydatabase CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
#CREATE USER 'newuser'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON mydatabase . * TO 'newuser'@'localhost';
FLUSH PRIVILEGES;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment