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
- The target instance and ECS must be in the same VPC and subnet.
- The ECS must be in a security group that can access the target instance.
- If the target instance is associated with the default security group, you do not need to configure security group rules for the instance and ECS.
- If the target instance is associated with a non-default security group, check whether the non-default security group rules allow the ECS to access the instance. For details, see Configuring Security Group Rules.
- The default port of the GeminiDB Influx instance is 8635 and cannot be changed.
Prerequisites
- To connect to an instance using a non-SSL connection, disable SSL first. For details, see Disabling SSL.
SSL Connection
- Log in to the ECS. For details, see section "Creating ECSs" in the Elastic Cloud Server User Guide.
- Upload the InfluxDB client installation package to the ECS.
- Decompress the InfluxDB client package.
tar -xzf influxdb-1.7.9-static_linux_amd64.tar.gz
- Connect your instance to the InfluxDB client.
- Run the following command to go to the InfluxDB directory:
cd influxdb-1.7.9-1
- 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
- Run the auth command to authenticate the user.
auth
Enter the username and password as prompted.
username:<DB_USER>
password:<DB_PWD>
- 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
- Log in to the ECS. For details, see section "Creating ECSs" in the Elastic Cloud Server User Guide.
- Upload the InfluxDB client installation package to the ECS.
- Decompress the InfluxDB client package.
tar -xzf influxdb-1.7.9-static_linux_amd64.tar.gz
- Connect your instance to the InfluxDB client.
- Run the following command to go to the InfluxDB directory:
cd influxdb-1.7.9-1
- 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
- Run the auth command to authenticate the user.
auth
Enter the username and password as prompted.
username:<DB_USER>
password:<DB_PWD>
- 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