Last active
April 3, 2022 08:04
-
-
Save DevSecOpsGuy/c0db568556fd7d4fd51ae2fe2f175040 to your computer and use it in GitHub Desktop.
This file contains 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
mysql -u root -p | |
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password'; | |
SELECT user(); | |
SELECT user FROM mysql.user; | |
SELECT user,host FROM mysql.user; | |
SELECT host,user,authentication_string FROM mysql.user; | |
SHOW DATABASES; | |
CREATE DATABASE testDB; | |
GRANT ALL PRIVILEGES ON testDB . * TO 'newuser'@'localhost'; | |
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost'; | |
FLUSH PRIVILEGES; | |
SHOW GRANTS FOR 'newuser'@'localhost'; | |
quit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment