How do you create the first user in Cassandra DB


title: “How do you create the first user in Cassandra DB”
date: 2016-09-27T08:06:01
slug: how-do-you-create-the-first-user-in-cassandra-db


You need to enable PasswordAuthenticator in cassandra.yaml file. To enable PasswordAuthenticator you need to change authenticator property in cassandra.yaml

Change

authenticator: AllowAllAuthenticator

to

authenticator: PasswordAuthenticator

After that login with following command and then you will be able to add new user

cqlsh -u cassandra -p cassandra

Once you get in, your first task should be to create another super user account.

CREATE USER dba WITH PASSWORD 'bacon' SUPERUSER;

Next, it is a really good idea to set the current Cassandra super user’s password to something else…preferably something long and incomprehensible. With your new super user, you shouldn’t need the default Cassandra account again.

ALTER USER cassandra WITH PASSWORD 'dfsso67347mething54747long67a7ndincom4574prehensi
Print Friendly, PDF & Email