Connect to the CQL shell for Astra DB

To run CQL statements against your Astra DB Serverless databases, you can use the CQL shell (cqlsh), a Cassandra driver, or the Data API. This guide explains how to use the CQL shell (cqlsh) to interact with your Astra DB databases. For information about other connection methods, see Cassandra Query Language (CQL) for Astra DB.

The CQL shell (cqlsh) is a utility that you can use to issue CQL and cqlsh commands to your Astra DB Serverless databases.

You can use the CQL console in the Astra Portal, or you can install the CQL shell utility with the Astra CLI.

Use the CQL console (embedded CQL shell)

In the Astra Portal, each Astra DB Serverless database has access to the CQL console, which is an embedded CQL shell instance. You can use the CQL console to run CQL and cqlsh commands on your databases directly from your browser without installing any additional software.

  1. In the Astra Portal, click the name of the database that you want to connect to.

  2. Click CQL console to open the embedded CQL shell in a new tab.

  3. Wait for the token@cqlsh> prompt to appear.

    This prompt indicates that CQL shell is connected to your database, and you can start sending CQL and cqlsh commands to your database.

  4. Optional: For multi-region databases, use the region menu to access data from a secondary region. Typically, you change regions only if the primary region is geographically distant from your machine. Due to Astra DB’s eventual consistency model, changes to data in any region are eventually replicated to the database’s other regions.

To directly access the built-in CQL console app for your database, sign in to the Astra Portal, and then navigate to the following URL:

DATABASE_ID-REGION.apps.astra.datastax.com/cqlsh

Replace the following:

  • DATABASE_ID: The database ID.

  • REGION: The name of a region where your database is deployed. This sets the region context for the CQL console session.

If you use custom domains, replace astra.datastax.com with your custom domain.

Use the standalone CQL shell

For remote programmatic access, use the Astra CLI to download, install, and use the standalone CQL shell utility:

Was this helpful?

Give Feedback

How can we improve the documentation?

© Copyright IBM Corporation 2026 | Privacy policy | Terms of use |  Manage Privacy Choices

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: Contact IBM