Rocky Pulley
Rocky Pulley

Reputation: 23321

can't access keyspace in cql created in cli

I created a keyspace with the cassandra-cli tool, and i can "use" it. However when I go try to use the cqlsh command to "use" the keyspace, it doesn't exist. Can I not use them both?

Upvotes: 1

Views: 1579

Answers (3)

Talko
Talko

Reputation: 81

If you used uppercase as name for Your Keyspace, you'll have to use quotes: use "Twissandra" The same for the column family: select * from "User";

Upvotes: 8

emgsilva
emgsilva

Reputation: 3065

This is very curious indeed... I have just experienced a similar behavior. What I noticed was that cqlsh "does not like" CamelCase names. I had multiple keysets, and it did not allowed me to "use" any of them, only the ones without CamelCased names... I made a simple experiment of creating a keyspace with only lower cases from cassandra-gui, and then access it from cqlsh, and it worked perfectly. Not sure exactly why this happens, but it works.

Upvotes: 0

I am using cassandra 1.1.1 and I never face this kind of issue; Check if your cqlsh client is pointing to your cassandra server (open the cqlsh file and see if "DEFAULT_HOST" points to your cassandra server). It may help

Upvotes: 0

Related Questions