How to change password for Cassandra

Table of Contents

The default password for Cassandra is Cassandra. So we need to change it immediately after we install it. We can use this command to change it.

Change default password for Cassandra user

# cqlsh `hostname` -u cassandra


Connected to xxx at xxx-xxx-xxx-2.localdomain:9042.

[cqlsh 5.0.1 | Cassandra 2.2.13 | CQL spec 3.3.1 | Native protocol v4]

Use HELP for help.


cassandra@cqlsh> ALTER USER cassandra with PASSWORD ‘xxxx#####xxxxxxx’;

cassandra@cqlsh> exit

David Cao
David Cao

Hey there! I am David, a Cloud & DevOps Enthusiast and 18 years of experience as a Linux engineer. I work with AWS, Git & GitHub, Linux, Python, Ansible, and Bash. I am a technical blogger and a Software Engineer, enjoy sharing my learning and contributing to open-source.