ALTER ROLE
Synopsis
The ALTER ROLE
statement changes the properties of an existing role.It allows modifying properties SUPERUSER
, PASSWORD
, and LOGIN
.
This statement is enabled by setting the YB-TServer configuration option use_cassandra_authentication
to true
.
Syntax
Diagram
Grammar
alter_table ::= ALTER ROLE role_name WITH role_property [ AND role_property ...];
role_property ::= PASSWORD = '<Text Literal>'
| LOGIN = <Boolean Literal>'
| SUPERUSER = '<Boolean Literal>'
Where
role_name
is a text identifier.
Semantics
- An error is raised if
role_name
does not exist.
Examples
You can do this as shown below.
cqlsh:example> CREATE ROLE finance;
cqlsh:example> ALTER ROLE finance with LOGIN = true;
cqlsh:example> ALTER ROLE finance with SUPERUSER = true;
cqlsh:example> ALTER ROLE finance with PASSWORD = 'jsfp9ajhufans2' AND SUPERUSER = false;
See also
当前内容版权归 YugabyteDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 YugabyteDB .