1. 修改cassandra.yaml配置文件。启用用户密码登录形式。

authenticator: PasswordAuthenticator

authorizer: CassandraAuthorizer

2. 启动cassandra,cqlsh工具使用默认角色cassandra/cassandra登录。

./cqlsh 191.0.0.101 -u cassandra -p cassandra

3. 创建超级用户,密码。

CREATE ROLE root WITH PASSWORD = 'root' AND LOGIN = true AND SUPERUSER = true;

4. 使用超级用户登录。

./cqlsh 191.0.0.101 -u root -p root

5. 安全起见,删除默认用户cassandra。

drop user cassandra;

6. 创建普通用户。

CREATE ROLE xxx WITH PASSWORD = 'xxx' AND LOGIN = true;

7. 为普通用户授权。

GRANT CREATE ON KEYSPACE nnel TO xxx;
GRANT ALTER ON KEYSPACE nnel TO xxx;
GRANT DROP ON KEYSPACE nnel TO xxx;
GRANT SELECT ON KEYSPACE nnel TO xxx;
GRANT MODIFY ON KEYSPACE nnel TO xxx;

8. 查看用户权限。

LIST ALL PERMISSIONS OF xxx;

最新文章

  1. mysql安装及配置服务
  2. ubuntu下安装mysql及卸载mysql方法
  3. linux install matlab2014a
  4. Linux 设置定时任务crontab命令
  5. LeetCode:Move Zeroes
  6. HDU 4681 String 最长公共子序列
  7. jQuery 的 $("someobjectid”).event() 的绑定
  8. 使用PHP脚本来写Daemon程序
  9. swift和 oc 混编2-备
  10. Deep Learning(深度学习)学习笔记整理系列之(六)
  11. 2的幂次方(power)
  12. 浅谈EL
  13. RadioButton与监听
  14. String字符串的操作
  15. 2018-09-13 代码翻译尝试-使用Roaster解析和生成Java源码
  16. IIS的启动与停止命令
  17. Spark机器学习(上)
  18. Java 多线程重排序的探究
  19. Android studio 中,遇到报错:ERROR: x86_64 emulation currently requires hardware acceleration! CPU acceleration status:HAXM must be updated(version 1.1.1<6.0.1)的解决方法
  20. React Native 组件之TouchableHightLight

热门文章

  1. FORTH运算符
  2. Spring-depends on
  3. 绕过js验证
  4. junit--eclipse插件
  5. 添加FTP用户(vsftpd)
  6. 在 ios 中的日期格式
  7. JDOJ-P1260 VIJOS-P1083 小白逛公园
  8. 布衣之路(一):VMware虚拟机+CentOS系统安装
  9. kickstart无人值守
  10. .NET框架(转)