|
MariaDB [(none)]> CREATE ROLE role_1;
|
Query OK, 0 rows affected (0.01 sec)
|
|
MariaDB [(none)]> CREATE ROLE role_2 WITH ADMIN role_1;
|
Query OK, 0 rows affected (0.00 sec)
|
|
MariaDB [(none)]> show grants for role_1;
|
+--------------------------------------------+
|
| Grants for role_1 |
|
+--------------------------------------------+
|
| GRANT role_2 TO 'role_1' WITH ADMIN OPTION |
|
| GRANT USAGE ON *.* TO 'role_1' |
|
| GRANT USAGE ON *.* TO 'role_2' |
|
+--------------------------------------------+
|
|
MariaDB [(none)]> show grants for role_2;
|
+--------------------------------+
|
| Grants for role_2 |
|
+--------------------------------+
|
| GRANT USAGE ON *.* TO 'role_2' |
|
+--------------------------------+
|