英文:
How do I create users in the Cassandra shell?
问题
我是新手,正在尝试使用Cassandra部署一个应用程序。我在我的Cassandra数据库中创建了一个键空间,但是当我创建键空间帐户时,出现了以下错误:
我尝试了许多方法,比如创建用户和创建角色,但都没有成功。我正在使用的版本是3.11.13。
CREATE ROLE etl WITH PASSWORD = 'xxxxxx' AND LOGIN = true;
InvalidRequest: Error from server: code=2200 [Invalid query]
message="org.apache.cassandra.auth.CassandraRoleManager doesn't support PASSWORD"
CREATE ROLE
CREATE USER
英文:
I'm new to Cassandra and trying to deploy an application using Cassandra. I created a keyspace in my Cassandra DB but when I create my keyspace account I get an error like below
I have tried many ways like create user and create roles but it doesn't work. The version I am using is 3.11.13
CREATE ROLE etl WITH PASSWORD = 'xxxxxx' AND LOGIN = true;
InvalidRequest: Error from server: code=2200 [Invalid query]
message="org.apache.cassandra.auth.CassandraRoleManager doesn't support PASSWORD"
CREATE ROLE
CREATE USER
答案1
得分: 1
错误表明您尚未在您的集群中启用身份验证。
只有在您配置了PasswordAuthenticator
时,才支持PASSWORD
选项。默认情况下,cassandra.yaml
中禁用了身份验证:
authenticator: AllowAllAuthenticator
您需要使用密码验证器配置节点以启用身份验证:
authenticator: PasswordAuthenticator
有关详细信息,请参阅Cassandra 3.11中启用密码身份验证。干杯!
英文:
The error indicates that you haven't enabled authentication in your cluster.
The PASSWORD
option is only supported if you have configured PasswordAuthenticator
. By default, authentication is disabled in cassandra.yaml
with:
authenticator: AllowAllAuthenticator
You need to configure the nodes with the password authenticator to enable authentication:
authenticator: PasswordAuthenticator
For details, see Enabling Password Authentication in Cassandra 3.11. Cheers!
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论