[MDEV-22311] implement SHOW CREATE ROLE Created: 2020-04-20 Updated: 2023-11-30 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Authentication and Privilege System |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Ralf Gebhardt |
| Resolution: | Unresolved | Votes: | 4 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
SHOW CREATE ROLE doesn't work. See here:
Since you can create a role with its own WITH ADMIN clause, this statement should be implemented, so that all role attributes can be easily printed. |
| Comments |
| Comment by Lon Hammonds [ 2020-10-07 ] | |||||
|
Something like this is needed as well as a way to determine default role so we can export users, grants AND roles for migration/import into other servers. As it stands now, the standard way to export users to .sql breaks if any roles exists because roles exist in the user database but are not treated the same. I have documented my workaround below which uses "sed" to create the desired SQL syntax for importing on another server: https://ubuntuforums.org/showthread.php?t=2451555 Here are copy/paste of the important bits: Role Creation
Role Grants
User Creation
User Grants
Role Defaults
I voted for this issue. | |||||
| Comment by Sergei Golubchik [ 2020-11-04 ] | |||||
|
Roles should be dumped in a specific order. |