user6784306
user6784306

Reputation: 57

How to Find Username Password of cassandra

Well I am new to cassandra and i dont know how to find Username and Password after installing it from a open source. I just install it. When I was going to connect it to netbeans it ask username and password. But in cassandra, i cant find any way to find its username and password. Please tell me steps that I should follow to find my Username and password.

Upvotes: 4

Views: 16135

Answers (2)

khakishoiab
khakishoiab

Reputation: 10808

Stop your Cassandra cluster. On each node, cd down to your data directory, and execute:

$ mv system_auth system_auth_20140814

Restart each node. As long as the authenticator is still set (in your cassandra.yaml) to use the PasswordAuthenticator, Cassandra will rebuild the system_auth keyspace, with the default Cassandra super user, which you can use with cqlsh to get back in.

$

./cqlsh -u cassandra -p cassandra
Connected to MyCluster at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 2.1.0-rc5-SNAPSHOT | CQL spec 3.2.0 | Native protocol v3]
Use HELP for help.
cqlsh>

Notes:

You will have to re-add all of your users, and re-apply all off their permissions. Instead of renaming (mv) the system_auth directory, you could also just delete it (rm). You will have to re-apply the appropriate replication settings to your system_auth keyspace. By default, system_auth only has a replication factor of 1.

Upvotes: 5

johri21
johri21

Reputation: 163

If it is a fresh installation try username cassandra and password cassandra

This is the default username and password. Remember to change which can be done via cqlsh.

Hope this helps.

Upvotes: 3

Related Questions