設置cassandra用戶名和密碼


參考http://zhaoyanblog.com/archives/307.html

 

修改cassandra.yaml配置文件

把默認的

authenticator: AllowAllAuthenticator

改成

authenticator: PasswordAuthenticator

 

如果你需要登陸進去以后查看修改權限之類,需要修改

authorizer: AllowAllAuthorizer

authorizer: CassandraAuthorizer

 

啟動cassandra

cql連接,cassandra是默認賬戶和密碼

./cqlsh -u cassandra -p cassandra ip port

 

創建用戶

CREATE USER myusername WITH PASSWORD 'mypassword' SUPERUSER ;

這里用戶有兩種,一個是superuser,一種是nosuperuser

 

cqlsh退出以后,用新用戶登陸

drop user cassandra;

 

注意,如果是集群模式,只需要在一台機器上配置就可以了,會自動同步過去


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM