Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lorenadl/8767393e50ef3ef72137c0aff095e137 to your computer and use it in GitHub Desktop.
Save lorenadl/8767393e50ef3ef72137c0aff095e137 to your computer and use it in GitHub Desktop.
MySQL create user with password and grant privileges

MySQL create user with password and grant privileges

CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';

GRANT ALL PRIVILEGES ON database_name.* TO username@localhost;

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