Cassandra set access password

1. Modify the configuration file cassandra.yaml and change authenticator: AllowAllAuthenticator to authenticator: PasswordAuthenticator


 

2. Restart cassandra


 

3. Log in with the default username cassandra and the default password cassandra, cqlsh -ucassandra -pcassandra


 

4. 创建用户CREATE USER myusername WITH PASSWORD 'mypassword' SUPERUSER ; (NOSUPERUSER | SUPERUSER)


 

5. Delete the default account: DROP USER cassandra;

Note: You need to log in again with the newly created account to delete the default account


 

6. Windows creates a new folder .cassandra in the user directory, and creates a new file cqlshrc in it to write the new user information to set up passwordless access

[authentication]
username = root
password = 123456


 Log out of the current user and log in again with cqlsh, you don't need to enter the password again

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327040036&siteId=291194637