Connecting to a GeminiDB Influx Instance Over Private Networks

Scenarios

This section uses the Linux operating system as an example to describe how to connect an ECS to a GeminiDB Influx instance over private networks.

Usage Notes

Prerequisites

SSL Connection

  1. Log in to the ECS. For details, see section "Creating ECSs" in the Elastic Cloud Server User Guide.
  2. Upload the InfluxDB client installation package to the ECS.
  3. Decompress the InfluxDB client package.

    tar -xzf influxdb-1.7.9-static_linux_amd64.tar.gz

  4. Connect your instance to the InfluxDB client.

    1. Run the following command to go to the InfluxDB directory:
      cd influxdb-1.7.9-1
    2. Run the following command to connect to the InfluxDB shell:
      ./influx -ssl -unsafeSsl -host <DB_HOST> -port <DB_PORT>

      Example:

      ./influx -ssl -unsafeSsl -host 192.168.1.201 -port 8635
    3. Run the auth command to authenticate the user.

      auth

      Enter the username and password as prompted.

      username:<DB_USER>

      password:<DB_PWD>

    • <DB_USER> indicates the administrator name. The default value is rwuser.
    • <DB_PWD> indicates the administrator password.
    • <DB_HOST> indicates the private IP address of the node to be connected. Obtain the value from the Private IP Address column in the node list on the Basic Information page.

      If your instance has multiple nodes, select the private IP address of a node.

    • <DB_PORT> indicates the port. The default value is 8635 and cannot be changed.

  5. After the authentication is successful, run the show databases command.

    If the following information is displayed, the connection is successful.

    name: databases
    name
    ----
    _internal

Non-SSL Connection

  1. Log in to the ECS. For details, see section "Creating ECSs" in the Elastic Cloud Server User Guide.
  2. Upload the InfluxDB client installation package to the ECS.
  3. Decompress the InfluxDB client package.

    tar -xzf influxdb-1.7.9-static_linux_amd64.tar.gz

  4. Connect your instance to the InfluxDB client.

    1. Run the following command to go to the InfluxDB directory:

      cd influxdb-1.7.9-1

    2. Run the following command to connect to the InfluxDB shell:
      ./influx -host <DB_HOST> -port <DB_PORT>

      Example:

      ./influx -host 192.168.1.201 -port 8635
    3. Run the auth command to authenticate the user.

      auth

      Enter the username and password as prompted.

      username:<DB_USER>

      password:<DB_PWD>

    • <DB_USER> indicates the administrator name. The default value is rwuser.
    • <DB_PWD> indicates the administrator password.
    • <DB_HOST> indicates the private IP address of the node to be connected. Obtain the value from the Private IP Address column in the node list on the Basic Information page.

      If your instance has multiple nodes, select the private IP address of a node.

    • <DB_PORT> indicates the port. The default value is 8635 and cannot be changed.

  5. After the authentication is successful, run the show databases command.

    show databases

    If the following information is displayed, the connection is successful.

    name: databases
    name
    ----
    _internal