Created
October 24, 2022 08:42
-
-
Save jetersen/6d1e9b97890a3d842c79f7534e4f22cf to your computer and use it in GitHub Desktop.
Create user and grant privileges to database
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
CREATE USER 'user'@'%' IDENTIFIED BY 'password'; | |
GRANT USAGE ON *.* TO 'user_o'@'%'; | |
GRANT EXECUTE, SELECT, SHOW VIEW, ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE, CREATE TEMPORARY TABLES, CREATE VIEW, DELETE, DROP, EVENT, INDEX, INSERT, REFERENCES, TRIGGER, UPDATE, LOCK TABLES ON `database`.* TO 'user'@'%'; | |
FLUSH PRIVILEGES; | |
SHOW GRANTS FOR 'user'@'%'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment