Connect to Hyper-Converged Database (HCD) with cqlsh

To use the command line tool cqlsh to connect to Hyper-Converged Database (HCD) and test any feature such as vector search, you must be using the correct version. There are three possibilities to obtain the correct vector-search-ready version:

  • Download cqlsh from the DataStax Downloads page and select the DataStax HCD 1.0.0 (early preview) version.

  • Use the version bundled with the tarball.

  • Use the version bundled with the HCD Docker container; it can be executed inside the running container.

Prerequisites

  • Python 3.6+

DataStax CQLSH License Terms. By downloading this DataStax product, you agree to the terms of the EULA.

Standalone cqlsh

  1. On the DataStax Download page, choose a compatible version, and if you agree with the license terms, select the CQLSH Terms checkbox.

  2. Then click Download to download the tool.

    DataStax CQLSH License Terms. By downloading this DataStax product, you agree to the terms of the EULA.

  3. Once the file is downloaded, unpack (unzip) the distribution using the following command-line command:

    tar -xzvf cqlsh-6.8.tar.gz

    The files are extracted in the current directory, so be sure to change to the appropriate directory before running the tar command.

cqlsh in the tarball

If you have installed HCD from the tarball, you can find the cqlsh script in the bin directory of the HCD installation directory.

cqlsh in the Docker container

If you are using the HCD Docker container, you can run the cqlsh script inside the container in the bin directory of the HCD installation directory.

Connect to HCD with cqlsh

Connect with the command-line client cqlsh, making sure to use a newer version with built-in vector type support (either the one bundled in the Docker container or in the tarball). If cqlsh starts properly, version numbers and the cqlsh command prompt will appear.

bin/cqlsh
Result
Connected to Test Cluster at 127.0.0.1:9042
[cqlsh 6.2.0 | Cassandra 5.0 | CQL spec 3.4.7 | Native protocol v5]
Use HELP for help.
cqlsh> 

If cqlsh cannot connect and mentions a different port than 9042, check your ~/.cassandra/cqlshrc file which could be modifying the defaults.

See Use and configure cqlsh if you need to connect remotely to an HCD cluster.

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