Connecting to a GaussDB(for Cassandra) Instance Over Public Networks

Scenarios

You can use an ECS or local device to connect to a GaussDB NoSQL instance over a public network.

This section describes how to use a Linux ECS to connect to a GaussDB(for Cassandra) instance over a public network.

Prerequisites

Connecting to a DB Instance Through a Cassandra Client

  1. Log in to the ECS. For details, see the section "Logging In to an ECS" in the Elastic Cloud Server User Guide.
  2. Upload the Cassandra client installation package to ECS.
  3. Obtain the client tool cqlsh.
  4. Connect to the DB instance in the directory where the cqlsh tool is located.

    ./cqlsh <DB_HOST> <DB_PORT> -u <DB_USER>

    Example:

    ./cqlsh 192.168.1.8 8635 -u rwuser

    • <DB_HOST> indicates the EIP of the node to be connected. Obtain the value from the EIP column in the node list on the Basic Information page.
    • <DB_PORT> indicates the port number. The default value is 8635 and cannot be changed.
    • <DB_USER> indicates the database account name. The default value is rwuser.

  5. Check the connection result. If the following information is displayed, the connection is successful.

    rwuser@cqlsh>

Follow-up Operations

After logging in to the GaussDB(for Cassandra) instance, you can perform the following operations: