Connect to a Lindorm cluster

更新时间:
复制 MD 格式

To run Cassandra Query Language (CQL) statements against a Lindorm cluster, you need an endpoint, a username, and a password. This page shows you how to get those credentials, configure a whitelist, and make your first connection.

Prerequisites

Before you begin, ensure that you have:

  • Access to the Lindorm console

  • A running ApsaraDB for Lindorm cluster

Step 1: Get an endpoint

Lindorm clusters support two network types — virtual private cloud (VPC) and Internet — each with a different endpoint. Both the multi-language Cassandra client driver and lindorm-cqlsh use port 9042 by default.

  1. Log in to the Lindorm console.

  2. Go to the Database Connections page for your cluster.

  3. Copy the endpoint for your target network type (VPC or Internet).

To connect over the Internet, enable Internet access for the cluster before copying the Internet endpoint.

Step 2: Get a username and password

In the Lindorm console, locate your cluster credentials:

  • Username — the account used to authenticate CQL connections

  • Password — the corresponding password

Save both values. You will use them together with the endpoint when initializing the client driver.

Step 3: Configure a whitelist

Lindorm restricts inbound connections to IP addresses on its whitelist. Add your client's IP address to control which hosts can access the cluster.

  1. Find the node IP address of the machine running the Cassandra client driver.

  2. In the Lindorm console, open the whitelist configuration for your cluster.

  3. Add the node IP address to the whitelist.

Connect to the cluster

With the endpoint, username, password, and whitelist configured, use a multi-language Cassandra client driver or lindorm-cqlsh with port 9042 to establish the connection and start running CQL statements.