改变
authenticator: AllowAllAuthenticator
到
authenticator: PasswordAuthenticator
在cassandra.yaml
配置文件中并重新启动 Cassandra。
这将在重新启动时为您创建一个超级用户 cassandra。确保您安装了 Phthon27、thrift-0.91、Cassandra(datastax 社区版 2.0.9)等。现在,当您登录 cassandra 时,它会让您以超级用户身份输入。您现在可以创建新的超级用户并更改现有超级用户的密码。
python cqlsh localhost -u cassandra -p cassandra
Connected to Test Cluster at localhost:9160.
[cqlsh 4.1.1 | Cassandra 2.0.9 | CQL spec 3.1.1 | Thrift protocol 19.39.0]
使用帮助寻求帮助。
cqlsh> create user abc with password 'xyz' superuser;
cqlsh> alter user cassandra with password 'gaurav';
cqlsh> exit