自己安装的openGauss环境
启动openGauss
gs_ctl -D /gauss/data/db1/ start
登录openGauss
gsql -d postgres -p 26000 -r
1.创建角色role1为系统管理员, role2指定生效日期, role3具有LOGIN属性
\du
create role role1 SYSADMIN identified by ‘Test_@1111’;
create role role2 identified by ‘Test_@2222’ VALID BEGIN ‘2021-12-20’;
create role role3 LOGIN identified by ‘Test_@3333’;
\du

2.重命名role1
ALTER ROLE role1 RENAME TO role10;
\du

3.修改role2密码
alter role role2 identified by ‘Test_@54321’;

4.将omm权限授权给role3,再回收role3的权限
grant omm to role3 with admin option;
\du+ role3
revoke all privilege from role3;

5.删除所有创建角色
drop role role10;
drop role role2;
drop role role3;
\du

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




