Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create user func_1@localhost identified by 'func1';
- create user func_2@localhost identified by 'func2';
- create user func_3@localhost identified by 'func3';
- create user func_4@localhost identified by 'func4';
- create user func_5@localhost identified by 'func5';
- create role 'Administrador','Desenvolvedor','Designer','Desenvolvedor estagiário', 'Revisor';
- grant all on livraria_prof.* to Administrador with grant option;
- grant all on restaurantes.* to Administrador with grant option;
- grant Administrador to func_1@localhost; /*func_1 = Administrador*/
- set default role Administrador for func_1@localhost; /*MariaDB Sintax*/
- grant alter,create,drop,trigger,show view,create view,create routine, alter routine,execute,select,insert,update,delete,execute on livraria_prof.* to Desenvolvedor;
- grant alter,create,drop,trigger,show view,create view,create routine, alter routine,execute,select,insert,update,delete,execute on restaurantes.* to Desenvolvedor;
- grant Desenvolvedor to func_2@localhost; /*Func_2 = Desenvolvedor*/
- set default role Desenvolvedor for func_2@localhost; /*MariaDB Sintax*/
- grant alter,create,trigger,show view,create view,create routine, alter routine,execute,select,insert,update,execute on livraria_prof.* to 'Desenvolvedor estagiário';
- grant alter,create,trigger,show view,create view,create routine, alter routine,execute,select,insert,update,execute on restaurantes.* to 'Desenvolvedor estagiário';
- grant 'Desenvolvedor estagiário' to func_3@localhost; /*Func_3 = Desenvoledor estagiário*/
- set default role 'Desenvolvedor estagiário' for func_3@localhost; /*MariaDB Sintax*/
- grant alter,create,drop,select,insert,update on livraria_prof.* to Revisor;
- grant alter,create,drop,select,insert,update on restaurantes.* to Revisor;
- grant Revisor to func_4@localhost; /*Func_4 = Revisor*/
- set default role Revisor for func_4@localhost; /*MariaDB Sintax*/
- grant select on livraria_prof.* to Designer;
- grant select on restaurantes.* to Designer;
- grant Designer to func_5@localhost; /*Func_5 = Revisor*/
- set default role Designer for func_5@localhost; /*MariaDB Sintax*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement