Cassandra: Difference between revisions
Jump to navigation
Jump to search
(Created page with "== Cassandra == <syntaxhighlight lang="bash"> nodetool status </syntaxhighlight> <syntaxhighlight lang="bash"> CREATE KEYSPACE IF NOT EXISTS myWorkspace </syntaxhighlight>") |
|||
Line 4: | Line 4: | ||
nodetool status | nodetool status | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<syntaxhighlight lang="bash"> | |||
bin/cqlsh localhost | |||
SELECT cluster_name, listen_address FROM system.local; | |||
</syntaxhighlight> | |||
* Update /etc/cassandra/yaml to add password authentification | |||
<pre> | |||
Old value: | |||
authenticator: AllowAllAuthenticator | |||
Change with this new value: | |||
authenticator: PasswordAuthenticator | |||
</pre> | |||
* Test new configuration | |||
<syntaxhighlight lang="bash"> | |||
cqlsh -u cassandra -p cassandra | |||
</syntaxhighlight> | |||
* Change default cassandra password | |||
<syntaxhighlight lang="bash"> | |||
ALTER USER cassandra WITH PASSWORD 'newPassword'; | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="bash"> | |||
create KEYSPACE mmyKeyspace WITH replication = {'class': 'NetworkTopologyStrategy', 'datacenter1': 3}; | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> |
Revision as of 19:27, 11 October 2020
Cassandra
nodetool status
bin/cqlsh localhost
SELECT cluster_name, listen_address FROM system.local;
- 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 KEYSPACE mmyKeyspace WITH replication = {'class': 'NetworkTopologyStrategy', 'datacenter1': 3};
CREATE KEYSPACE IF NOT EXISTS myWorkspace