当前位置:网站首页>GBase 8c 创建用户/角色 示例二
GBase 8c 创建用户/角色 示例二
2022-07-03 02:18:00 【大壮十二】
6、创建复制账号:repl
gbase=# CREATE USER repl REPLICATION LOGIN ENCRYPTED PASSWORD 'repl';
CREATE ROLE
7、其他说明
GRANT { { SELECT | INSERT | UPDATE | DELETE | TRUNCATE | REFERENCES | TRIGGER }
[, ...] | ALL [ PRIVILEGES ] }
ON { [ TABLE ] table_name [, ...]
| ALL TABLES IN SCHEMA schema_name [, ...] }
TO role_specification [, ...] [ WITH GRANT OPTION ]
##单表授权:授权zjy账号可以访问schema为zjy的zjy表grant select,insert,update,delete on zjy.zjy to zjy;
##所有表授权:grant select,insert,update,delete on all tables in schema zjy to zjy;
GRANT { { SELECT | INSERT | UPDATE | REFERENCES } ( column_name [, ...] )
[, ...] | ALL [ PRIVILEGES ] ( column_name [, ...] ) }
ON [ TABLE ] table_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
##列授权,授权指定列(zjy schema下的zjy表的name列)的更新权限给zjy用户grant update (name) on zjy.zjy to zjy;
##指定列授不同权限,zjy schema下的zjy表,查看更新name、age字段,插入name字段grant select (name,age),update (name,age),insert(name) on zjy.xxx to zjy;
GRANT { { USAGE | SELECT | UPDATE }
[, ...] | ALL [ PRIVILEGES ] }
ON { SEQUENCE sequence_name [, ...]
| ALL SEQUENCES IN SCHEMA schema_name [, ...] }
TO role_specification [, ...] [ WITH GRANT OPTION ]
##序列(自增键)属性授权,指定zjy schema下的seq_id_seq 给zjy用户grant select,update on sequence zjy.seq_id_seq to zjy;
##序列(自增键)属性授权,给用户zjy授权zjy schema下的所有序列grant select,update on all sequences in schema zjy to zjy;
GRANT { { CREATE | CONNECT | TEMPORARY | TEMP } [, ...] | ALL [ PRIVILEGES ] }
ON DATABASE database_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
##连接数据库权限,授权cc用户连接数据库zjygrant connect on database zjy to cc;
GRANT { USAGE | ALL [ PRIVILEGES ] }
ON DOMAIN domain_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
GRANT { USAGE | ALL [ PRIVILEGES ] }
ON FOREIGN DATA WRAPPER fdw_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
GRANT { USAGE | ALL [ PRIVILEGES ] }
ON FOREIGN SERVER server_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
GRANT { EXECUTE | ALL [ PRIVILEGES ] }
ON { { FUNCTION | PROCEDURE | ROUTINE } routine_name [ ( [ [ argmode ] [ arg_name ] arg_type [, ...] ] ) ] [, ...]
| ALL { FUNCTIONS | PROCEDURES | ROUTINES } IN SCHEMA schema_name [, ...] }
TO role_specification [, ...] [ WITH GRANT OPTION ]
GRANT { USAGE | ALL [ PRIVILEGES ] }
ON LANGUAGE lang_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
GRANT { { SELECT | UPDATE } [, ...] | ALL [ PRIVILEGES ] }
ON LARGE OBJECT loid [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
GRANT { { CREATE | USAGE } [, ...] | ALL [ PRIVILEGES ] }
ON SCHEMA schema_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
##连接schema权限,授权cc访问zjy schema权限grant usage on schema zjy to cc;
GRANT { CREATE | ALL [ PRIVILEGES ] }
ON TABLESPACE tablespace_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
GRANT { USAGE | ALL [ PRIVILEGES ] }
ON TYPE type_name [, ...]
TO role_specification [, ...] [ WITH GRANT OPTION ]
where role_specification can be:
[ GROUP ] role_name
| PUBLIC
| CURRENT_USER
| SESSION_USER
GRANT role_name [, ...] TO role_name [, ...] [ WITH ADMIN OPTION ]
##把zjy用户的权限授予用户cc。
grant zjy to cc;
边栏推荐
- stm32F407-------DMA
- DDL basic operation
- y54.第三章 Kubernetes从入门到精通 -- ingress(二七)
- Tongda OA homepage portal workbench
- Unrecognized SSL message, plaintext connection?
- In 2022, 95% of the three most common misunderstandings in software testing were recruited. Are you that 5%?
- stm32F407-------ADC
- SPI机制
- Method of removing webpage scroll bar and inner and outer margins
- Y54. Chapter III kubernetes from introduction to mastery -- ingress (27)
猜你喜欢

基于线程池的生产者消费者模型(含阻塞队列)

The use of Flink CDC mongodb and the implementation of Flink SQL parsing complex nested JSON data in monggo
![[shutter] pull the navigation bar sideways (drawer component | pageview component)](/img/6f/dfc9dae5f890125d0cebdb2a0f4638.gif)
[shutter] pull the navigation bar sideways (drawer component | pageview component)
【ROS进阶篇】第六讲 ROS中的录制与回放(rosbag)

通达OA 首页门户工作台

The data in servlet is transferred to JSP page, and the problem cannot be displayed using El expression ${}

Wechat applet Development Tool Post net:: Err Proxy Connexion Problèmes d'agent défectueux

Visual yolov5 format data set (labelme JSON file)

udp接收队列以及多次初始化的测试

Restcloud ETL cross database data aggregation operation
随机推荐
[shutter] shutter debugging (debugging control related functions | breakpoint management | code operation control)
Kotlin middle process understanding and Practice (I)
可视化yolov5格式数据集(labelme json文件)
Awk from introduction to earth (0) overview of awk
COM和CN
[codeforces] cf1338a - Powered addition [binary]
[Yu Yue education] reference materials of love psychology of China University of mining and technology
Qt之QComboBox添加QCheckBox(下拉列表框插入复选框,含源码+注释)
Redis:Redis的简单使用
微服务组件Sentinel (Hystrix)详细分析
es6 filter() 数组过滤方法总结
Visual yolov5 format data set (labelme JSON file)
awk从入门到入土(1)awk初次会面
Awk from entry to burial (1) awk first meeting
My creation anniversary
Deep learning notes (constantly updating...)
Summary of ES6 filter() array filtering methods
Job object of collaboration in kotlin
stm32F407-------ADC
What are the differences between software testers with a monthly salary of 7K and 25K? Leaders look up to you when they master it