3

我想做以下命令:

alter KEYSPACE system_auth 
WITH replication =  
       { 'class' : 'SimpleStrategy', 
         'replication_factor' : 2 };

system_auth 不显示为密钥空间是否正常?


基本上会发生以下错误:

Bad Request: Unknown keyspace system_auth


另外,我什至如何查看存在的键空间?甚至可以在 cqlsh 中查看它们吗?

4

2 回答 2

5

使用时不会创建该键空间authenticator: AllowAllAuthenticator (默认情况下)。所以,设置你的authenticator,重启你的节点,你会没事的

于 2014-03-06T07:12:46.907 回答
0

全新的 cassandra 安装中不存在 system_auth 密钥空间。这将在启用身份验证时自动创建,方法是更改​​ cassandra.yaml 中的两个属性,即 "authenticator: PasswordAuthenticator" 和 "authorizer: CassandraAuthorizer" 。

要查看键空间,请使用 cql 命令“desc keyspaces”或“select * from system.schema_keyspaces;”。

于 2014-05-06T05:42:07.643 回答