Skip to Content

How to change password for Cassandra

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

Password:

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

Get Your Free Linux training!

Thank you very much for visiting our website! We’re creating a comprehensive Linux training course! 🚀 If you're interested, just enter your email address, and we'll send it your way. It is free today. Hope it helps you level up your skills and accelerate your career! 🔥 Have a Nice day!

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

Use HELP for help.

cassandra@cqlsh>

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

cassandra@cqlsh> exit