Skip to content

Commit 44f94a6

Browse files
Update database DBA role docs
1 parent d8faded commit 44f94a6

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

docs/explanation/roles.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,14 @@ Charmed MySQL also introduces database level roles, with permissions tied to eac
5353
Example for a database named `test`:
5454

5555
```text
56-
mysql> SELECT host, user FROM mysql.user WHERE user LIKE '%_test';
57-
+-----------+------------------+
58-
| host | user |
59-
+-----------+------------------+
60-
| % | charmed_dba_test |
61-
+-----------+------------------+
56+
mysql> SELECT host, user FROM mysql.user WHERE user LIKE '%_test_%';
57+
+-----------+---------------------+
58+
| host | user |
59+
+-----------+---------------------+
60+
| % | charmed_dba_test_00 |
61+
+-----------+---------------------+
6262
```
6363

64-
The `charmed_dba_<database>` role contains every data and schema related permission, scoped to the database it references.
64+
The `charmed_dba_<database>_<num>` role contains every data and schema related permission, scoped to the database it references.
65+
The numeric part is introduced in order to differentiate across DBA roles whose first set of characters is the same,
66+
given that database names will be pruned in order to fit into the MySQL role length limit (32 characters).

0 commit comments

Comments
 (0)