Skip to content

Instantly share code, notes, and snippets.

@gabidavila
Last active November 8, 2022 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabidavila/9a506d0d3b15756a9f49c71fa4c7e38a to your computer and use it in GitHub Desktop.
Save gabidavila/9a506d0d3b15756a9f49c71fa4c7e38a to your computer and use it in GitHub Desktop.
-- Grants access to all databases and tables to the role "dba"
GRANT ALL ON *.* TO 'dba';
-- Grants access to the database "app" to the role "readonly"
GRANT SELECT ON app.* TO 'readonly';
-- Grants access to the database "app" to the role "datawrite"
GRANT INSERT, UPDATE, DELETE ON app.* TO 'app_write';
-- Grants access to developers
GRANT ALTER, DELETE, INDEX, INSERT, SELECT, UPDATE, CREATE VIEW,
SHOW VIEW, TRIGGER, CREATE TEMPORARY TABLES ON app.* TO 'developer';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment