title | description | date |
---|---|---|
Common RBAC queries |
Queries to help grant specific permissions to users. |
2023-09-28 |
GRANT CURRENT GRANTS ON *.* TO another_user;
In the below example, another_user
will be able to perform SELECT
commands on all of the databases and tables of the current user.
GRANT CURRENT GRANTS(SELECT ON *.*) TO another_user;
How do I grant a specific permission to a user for a specific database based on the grants of the current user?
In the below example, another_user
will be able to perform INSERT
commands to all tables in my_database
.
GRANT INSERT ON my_database.* TO another_user;
GRANT default_role TO another_user;