Connecting to an 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
- 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 and Unbinding an EIP and Configuring Security Group Rules.
- 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 InfluxDB client. 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 tool package.
tar -xzf influxdb-1.7.9-static_linux_amd64.tar.gz
- Connect to the DB instance in the directory where the influx tool is located.
- Run the following command to go to the InfluxDB directory:
- 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 and Unbinding 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.
- Use SSL to connect to a database.
- Run the following command for authentication:
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
- 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
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