Help Center/ GeminiDB/ GeminiDB Influx API/ Working with GeminiDB Influx API/ Instance Connection and Management/ Connecting to a GeminiDB Influx Instance over a Public Network
Updated on 2025-04-01 GMT+08:00

Connecting to a GeminiDB Influx Instance 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 tool package (the x86 client is used as an example).

    tar -xzf influxdb-1.8.10_linux_amd64.tar.gz

  4. Connect to the DB instance in the directory where the influx tool is located.

    1. Run the following command to go to the InfluxDB directory:
      cd influxdb-1.8.10-1/usr/bin
    2. Connect to a 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 Description

      Parameter

      Description

      <DB_HOST>

      EIP of the node to be connected

      To obtain this IP address, go to the Instances page and click the target DB instance name. The IP address can be found in the EIP field under Node Information on the Basic Information page.

      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.

      <DB_PORT>

      The port of the instance to be connected. The default value is 8635 and cannot be changed.

      Click the instance to go to the Basic Information page. In the Network Information area, you can find the database port.

    3. Run the following command for authentication:

      auth

      Enter the username and password as prompted.

      username:<DB_USER>

      password:<DB_PWD>

      Table 2 Description

      Parameter

      Description

      <DB_USER>

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

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

      <DB_PWD>

      Administrator password

  5. After the identity verification is successful, run the following command:

    show database

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

    name: databases
    name
    ----
    _internal