By default, accessing the Apache Cassandra database does not require credentials.
You need to configure Apache Cassandra to enable authentication. The Apache Cassandra Connector configuration must match the Apache Cassandra configuration for basic authentication.
After enabling authentication, run the cqlsh command from the Apache Cassandra installation home directory as shown in this example, which uses
default credentials with username cassandra and password cassandra:
bin/cqlsh localhost -u cassandra -p cassandra
Connected to Test Cluster at localhost:9042.
[cqlsh 5.0.1 | Cassandra 5.0 | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help.
-
After installing Apache Cassandra, open the conf\cassandra.yaml file for editing.
-
Optionally, change the value of AllowAllAuthenticator to PasswordAuthenticator.
-
Restart Apache Cassandra.
-
In a separate terminal tab, verify that Apache Cassandra is running: