Last active
November 30, 2017 13:54
-
-
Save a1exlism/a92459dfd4c92a663910f20e82ebb238 to your computer and use it in GitHub Desktop.
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 user: | |
| CREATE USER 'newuser'@'localhost' | |
| IDENTIFIED BY 'password'; | |
| grant privileges: | |
| GRANT ALL PRIVILEGES ON your_database.tables | |
| TO 'newuser'@'localhost'; | |
| -- 2in1: | |
| GRANT SELECT ON auth.* | |
| TO 'webauth'@'localhost' | |
| IDENTIFIED BY 'webauth'; | |
| -- reload: | |
| FLUSH PRIVILEGES; | |
| -- show privileges: | |
| SHOW GRANTS FOR `webauth`@`localhost`; | |
| -- show all users: | |
| SELECT User, Host, Password FROM mysql.user; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment