Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to list all users in the Cassandra shell?

Tags:

cassandra

cql

In the CQL shell, how do I list all users? I can't seem to find it anywhere on Stack Overflow.

like image 725
naXa Avatar asked Oct 02 '18 22:10

naXa


People also ask

How do you get all the table names in Cassandra?

To list all the tables (only the table names), DESC tables; To list all the tables and the schemas (CQL creation statements), DESC {$KEYSPACE_NAME} whereas {$KEYSPACE_NAME} is the name of the keyspace.

How do I see all Cassandra databases?

Go to data tab > there you will see all keyspcaces created by you and some system keyspaces. You can see all tables under individual keyspaces and also replicator factor for keyspace.


1 Answers

Prior to the introduction of roles in Cassandra 2.2, authentication and authorization were based around the concept of a USER.

Cassandra 2.2 onward CQL uses database roles to represent users and group of users. So to list users use below command accordingly.

LIST USERS;  -- cassandra version < 2.2

LIST ROLES;  -- cassandra version >= 2.2
like image 76
Laxmikant Avatar answered Sep 23 '22 19:09

Laxmikant