- Notifications
You must be signed in to change notification settings - Fork843
How to control table ownership#18971
-
I ceate user like that: create database bladedb root@localhost:8000/default/default> use bladedb; use bladedb root@localhost:8000/default/bladedb> create user bladeuser identified by 'bladeuser'; create user bladeuser identified by 'bladeuser' root@localhost:8000/default/bladedb> create role bladerole; create role bladerole root@localhost:8000/default/bladedb> grant ownership on bladedb.* to role bladerole; grant ownership on bladedb.* to role bladerole grant role bladerole to bladeuser then run go scrpts so i do another grant then run succecc ![]() ![]() This results in the need to manually modify ownership every time a table is created in the program. Is there any way to automatically isolate it so that it is not visible to other users |
BetaWas this translation helpful?Give feedback.
All reactions
For more info about ownership and privilege, can ref:
https://docs.databend.com/guides/security/access-control/ownership
https://docs.databend.com/guides/security/access-control/roles
https://docs.databend.com/guides/security/access-control/privileges
Replies: 5 comments
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
This error: query error: code: 1063, message: Permission denied: privilege [Create] is required on 'default'.'bladedb'.* for user 'bladeuser'@'%' with roles [public] means the go driver session confirm the user bladeuser only has role You can try this on your local bendsql: createuserbladeuser identified by'bladeuser' with default_role='bladerole';create role bladerole;grant ownershipon bladedb.* to role bladerole;grant role bladerole to user bladerole;-- use user bladerole create or do any operator under database `default.bladedb` |
BetaWas this translation helpful?Give feedback.
All reactions
-
For more info about ownership and privilege, can ref: https://docs.databend.com/guides/security/access-control/ownership |
BetaWas this translation helpful?Give feedback.
All reactions
-
If you want to know why the session only has one role |
BetaWas this translation helpful?Give feedback.
All reactions
-
The user bladeuser default role is public; You can use: or create user assign default role: |
BetaWas this translation helpful?Give feedback.
All reactions
-
OK solved 3Q! |
BetaWas this translation helpful?Give feedback.
All reactions
This discussion was converted from issue #18968 on November 14, 2025 06:16.



