Created
June 4, 2020 02:16
-
-
Save StuffbyYuki/4837e4fe89333406130b17850640494f to your computer and use it in GitHub Desktop.
SQL:MySQL - Create a new user and grand all the privileges
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --Create a new user | |
| CREATE USER 'usrname'@'localhost' IDENTIFIED BY 'password'; | |
| --Make sure your user is on here | |
| select user from MySQl.user; | |
| --Grand privillages | |
| GRANT ALL PRIVILEGES ON * . * TO 'usrname'@'localhost'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment