Starting cqlsh

Execute the cqlsh Python script to start the CQL shell. The CQL shell is a Python-based command line interface for running CQL commands interactively. The CQL shell supports tab completion. The cqlsh command runs in either Python 2 or 3.

To connect to a security-enabled cluster, see Providing Kerberos credentials when starting CQL shell.

For a complete list, see cqlsh (startup options).

Procedure

  1. Navigate to the DataStax Enterprise installation directory and locate the bin directory that contains cqlsh.

  2. Start cqlsh on the Mac OSX, for example.

    cqlsh

    If you use security features, provide a user name and password.

  3. Print the help menu for cqlsh.

    cqlsh --help
  4. Optionally, specify the IP address and port to start cqlsh on a different node.

    cqlsh 100.0.0.75 9042

    You can use tab completion to see hints about how to complete a cqlsh command. Some platforms, such as Mac OSX, do not ship with tab completion installed. Use easy_install to install tab completion capabilities on Mac OSX:

    +

    easy_install readline

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com