Cassandra: Difference between revisions
Jump to navigation
Jump to search
Line 9: | Line 9: | ||
SELECT cluster_name, listen_address FROM system.local; | SELECT cluster_name, listen_address FROM system.local; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Intial Seciruty === | |||
* Update /etc/cassandra/yaml to add password authentification | * Update /etc/cassandra/yaml to add password authentification | ||
Line 29: | Line 31: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
* Create a backup Admin | |||
<syntaxhighlight lang="bash"> | |||
create role myadmin with password = 'myAdminPassword' and login = true and superuser = true; | |||
</syntaxhighlight> | |||
=== Key space managmenet === | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
create KEYSPACE mmyKeyspace WITH replication = {'class': 'NetworkTopologyStrategy', 'datacenter1': 3}; | create KEYSPACE mmyKeyspace WITH replication = {'class': 'NetworkTopologyStrategy', 'datacenter1': 3}; |
Revision as of 19:31, 11 October 2020
Cassandra
nodetool status
bin/cqlsh localhost
SELECT cluster_name, listen_address FROM system.local;
Intial Seciruty
- Update /etc/cassandra/yaml to add password authentification
Old value: authenticator: AllowAllAuthenticator Change with this new value: authenticator: PasswordAuthenticator
- Test new configuration
cqlsh -u cassandra -p cassandra
- Change default cassandra password
ALTER USER cassandra WITH PASSWORD 'newPassword';
- Create a backup Admin
create role myadmin with password = 'myAdminPassword' and login = true and superuser = true;
Key space managmenet
create KEYSPACE mmyKeyspace WITH replication = {'class': 'NetworkTopologyStrategy', 'datacenter1': 3};
CREATE KEYSPACE IF NOT EXISTS myWorkspace