File: grant_revoke_current.result

package info (click to toggle)
mariadb 1%3A11.8.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 774,648 kB
  • sloc: ansic: 2,415,394; cpp: 1,796,628; asm: 381,336; perl: 62,933; sh: 50,563; pascal: 40,908; java: 39,363; python: 25,814; yacc: 20,444; sql: 17,907; xml: 12,354; ruby: 8,544; cs: 6,542; makefile: 6,145; ada: 1,879; lex: 1,194; javascript: 996; objc: 80; tcl: 73; awk: 46; php: 22
file content (44 lines) | stat: -rw-r--r-- 1,625 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
select priv into @root_priv from mysql.global_priv where user='root' and host='localhost';
grant select on *.* to current_role;
ERROR 0L000: Invalid definer
revoke select on *.* from current_role;
ERROR 0L000: Invalid definer
revoke all, grant option from current_role;
ERROR 0L000: Invalid definer
create role r1;
grant insert on test.* to r1;
grant r1 to current_user;
set role r1;
select current_role();
current_role()
r1
grant select on *.* to current_role;
show grants for current_role;
Grants for r1
GRANT SELECT ON *.* TO `r1`
GRANT INSERT ON `test`.* TO `r1`
revoke insert on test.* from current_role;
show grants for current_role;
Grants for r1
GRANT SELECT ON *.* TO `r1`
revoke all, grant option from current_role;
show grants for current_role;
Grants for r1
GRANT USAGE ON *.* TO `r1`
set password=password('foobar');
show grants;
Grants for root@localhost
GRANT `r1` TO `root`@`localhost` WITH ADMIN OPTION
GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` IDENTIFIED BY PASSWORD '*9B500343BC52E2911172EB52AE5CF4847604C6E5' WITH GRANT OPTION
GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
GRANT USAGE ON *.* TO `r1`
grant r1 to current_user() identified by 'barfoo';
show grants;
Grants for root@localhost
GRANT `r1` TO `root`@`localhost` WITH ADMIN OPTION
GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` IDENTIFIED BY PASSWORD '*343915A8181B5728EADBDC73E1F7E6B0C3998483' WITH GRANT OPTION
GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
GRANT USAGE ON *.* TO `r1`
set password='';
drop role r1;
update mysql.global_priv set priv=@root_priv where user='root' and host='localhost';