Cassandra create a new user

1.Configure the file cassandra.yaml

  set authenticator: PasswordAuthenticator

  the default value of authenticator is AllowAllAuthenticator

2.Loggin by the default user cassandra ,if you didn't create the user before,it will create a default user cassandra ,and the password is cassandra

  use the cqlsh

  ./cqlsh 192.168.1.201 -u cassandra

  Password:cassandra

3.Update the replication of the system_auth

  ALTER KEYSPACE system_auth WITH REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor' : 3};

4.Create a new user

  CREATE USER myusername WITH PASSWORD 'mypassword' SUPERUSER ;

 

Now , you can use the new user information loggin for cassandra.

posted @ 2016-07-05 16:16  薛晓东  阅读(215)  评论(0编辑  收藏  举报