github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/tenant/privilege/role4_special_roles.sql (about) 1 set global enable_privilege_cache = off; 2 -- cases for moadmin 3 drop role if exists rolex; 4 create role rolex; 5 drop user if exists userx; 6 create user userx identified by '111'; 7 grant moadmin to root,dump; 8 grant moadmin to userx; 9 grant moadmin to rolex; 10 grant rolex to moadmin; 11 grant public to root,dump; 12 grant public to userx; 13 grant public to rolex; 14 grant rolex to public; 15 16 revoke moadmin from root; 17 revoke moadmin from dump; 18 revoke moadmin from userx; 19 revoke moadmin from rolex; 20 revoke rolex from moadmin; 21 revoke public from root; 22 revoke public from dump; 23 revoke public from userx; 24 revoke public from rolex; 25 revoke rolex from public; 26 27 grant show databases,create database on account * to moadmin; 28 revoke show databases,create database on account * from moadmin; 29 revoke connect on account * from public; 30 revoke show databases on account * from public; 31 grant create account on account * to rolex; 32 grant drop account on account * to rolex; 33 grant alter account on account * to rolex; 34 drop role rolex; 35 drop user userx; 36 set global enable_privilege_cache = on;