Help Center/ GeminiDB/ GeminiDB Influx API/ Working with GeminiDB Influx API/ Instance Connection and Management/ Connecting to a GeminiDB Influx Instance Using the InfluxDB CLI over a Public Network
Updated on 2025-05-07 GMT+08:00

Connecting to a GeminiDB Influx Instance Using the InfluxDB CLI over a Public Network

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

Prerequisites

Procedure

  1. Log in to the ECS. For details, see Logging In to an ECS in Getting Started with Elastic Cloud Server.
  2. Upload the InfluxDB client installation package to the ECS using file transfer tools like XFTP.
  3. Decompress the client (for example, x86 client) tool package.

    tar -xzf influxdb-1.8.10_linux_amd64.tar.gz

  4. Connect to your instance in the directory where the InfluxDB client is located.

    1. Run the following command to go to the InfluxDB directory:
      cd influxdb-1.8.10-1/usr/bin
    2. Connect to the GeminiDB Influx instance.
      • Use SSL to connect to a database.
        ./influx -ssl -unsafeSsl -host <DB_HOST> -port <DB_PORT>

        Example:

        ./influx -ssl -unsafeSsl -host 10.xx.xx.xx -port 8635
      • Use a non-SSL connection to access a database.
        ./influx -host <DB_HOST> -port <DB_PORT>

        Example:

        ./influx -host 10.xx.xx.xx -port 8635
      
             
      Table 1 Parameters

      Parameter

      Description

      <DB_HOST>

      EIP of the node to be connected

      On the Instances page, click the target instance name. You can see the EIP in the EIP column in the Node Information area.

      If the instance you purchased has multiple nodes, select the EIP of any node.

      If no EIP has been bound to the current node, bind an EIP to the instance by following Binding an EIP to a GeminiDB Influx Instance Node.

      <DB_PORT>

      Port of an instance to be connected. The default port is 8635 and cannot be changed.

      Click the GeminiDB Influx instance to go to the Basic Information page. In the Network Information area, you can see the port.

    3. Run the auth command to authenticate the user.

      auth

      Enter the username and password as prompted.

      username:<DB_USER>

      password:<DB_PWD>

      Table 2 Parameters

      Parameter

      Description

      <DB_USER>

      Username of the administrator account. The default value is rwuser.

      On the Instances page, click the instance name. In the DB Information area on the Basic Information page, you can see the administrator username.

      <DB_PWD>

      Administrator password

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

    show database

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

    name: databases
    name
    ----
    _internal

Follow-up Operations

After you log in to the instance, you can create databases or data retention policies. For details, see Buying and Connecting to a GeminiDB Influx Instance.