redis-cli is a built-in command-line interface (CLI) of native Redis. You can use redis-cli to connect to an ApsaraDB for Redis instance from an Elastic Compute Service (ECS) instance or on-premises host and manage data.
The type of network used to connect to an ApsaraDB for Redis instance.
Network type | Description |
---|---|
VPC (recommended) | A virtual private cloud (VPC) is a private network dedicated to you on Alibaba Cloud. VPCs are logically isolated from each other at Layer 2 to provide higher security and performance. When redis-cli is deployed on an ECS instance, you can connect to an ApsaraDB for Redis instance through a VPC to improve security and reduce network latency. |
Internet | If you want to manage an ApsaraDB for Redis instance on an on-premises host, you can
deploy redis-cli on the host and connect to the ApsaraDB for Redis instance over the
Internet.
Note No network traffic data is charged if you connect to the ApsaraDB for Redis instance
over the Internet. But the connection may be exposed to security risks. We recommend
that you use a VPC to improve security.
|
Overview
- redis-cli is a built-in command-line interface (CLI) of native Redis. You can deploy
the tool on an ECS instance or an on-premises host by installing Redis services.
Note In addition to redis-cli, you can also use Data Management Service (DMS) to connect to a database of an ApsaraDB for Redis instance without a client program. This helps manage the database in a graphic user interface. For more information, see Use DMS.
- The redis-cli version can be different from the major version of the ApsaraDB for Redis instance.
redis-cli connection method (Linux)
redis-cli connection method (Windows)
Note Only the 64-bit Windows operating system is supported.
Common connection errors
Note If the minor version of your instance is earlier than required, the returned error
message may be misleading. We recommend that you upgrade your instance to the latest
minor version. For more information, see Upgrade the minor version.
Error message | Cause and solution |
---|---|
(error) ERR illegal address |
The whitelist setting is not configured as required. For more information, see Step 2 in redis-cli connection method (Linux) or redis-cli connection method (Windows). |
(error) ERR client ip is not in whitelist |
|
(error) ERR invalid password |
The password is invalid. Make sure that you use the correct password in valid format.
The password format varies based on the selected account.
Note If you forget your password, you can reset it. For more information, see Change or reset the password.
|