Database Reference
In-Depth Information
Now that authentication is enabled, you can complete the following steps:
1.
First, let's try connecting to the server creating a keyspace without
our username/password:
create keyspace system_temp with replication
= { 'class' : 'SimpleStrategy',
'replication_factor' : 3 };
On executing, the above command will produce the error shown
in Figure 4-5 .
Figure 4-5 . A connection failure because we did not authenticate before trying to create the
keyspace
2.
Now, connect using the user name and password and create the key-
space:
// connect with user name and password.
$CASSANDRA_HOME/bin/cqlsh -3 -u cassandra -p
cassandra
// create keyspace.
create keyspace system_temp with replication
= { 'class' : 'SimpleStrategy',
'replication_factor' : 3 };
Figure 4-6 shows a successful connection.
Figure 4-6 . After successfully connecting using user credentials
3.
Next, let's create a superuser and non-superuser:
 
 
 
 
Search WWH ::




Custom Search