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
- Bind an EIP to the GeminiDB Influx instance and configure security group rules to ensure that the instance is accessible from ECSs through the EIP. For details, see Binding an EIP to a GeminiDB Influx Instance Node and Setting Security Group Rules for a GeminiDB Influx Instance.
- An ECS has been created. The following uses a Linux ECS as an example. For details, see Purchasing an ECS in Getting Started with Elastic Cloud Server.
- Download the x86 client or Arm client of InfluxDB. The following uses the Linux 64-bit client as an example.
Procedure
- Log in to the ECS. For details, see Logging In to an ECS in Getting Started with Elastic Cloud Server.
- Upload the InfluxDB client installation package to the ECS using file transfer tools like XFTP.
- Decompress the client (for example, x86 client) tool package.
tar -xzf influxdb-1.8.10_linux_amd64.tar.gz
- Connect to your instance in the directory where the InfluxDB client is located.
- Run the following command to go to the InfluxDB directory:
cd influxdb-1.8.10-1/usr/bin
- 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.
- Use SSL to connect to a database.
- 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
- Run the following command to go to the InfluxDB directory:
- 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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot