redis-cli is a built-in command line interface (CLI) of Redis. You can use redis-cli to connect to an ApsaraDB for Redis instance from an Elastic Compute Service (ECS) instance or on-premises device to manage data.
Workflow
Procedure | Description |
---|---|
1. Specify the account used to connect to an ApsaraDB for Redis instance and the account password. | The following methods are available:
|
2. Configure a whitelist. | The recommended network type varies with device.
|
3. Obtain the connection information. |
For more information, see View endpoints. |
4. Use redis-cli to connect to the ApsaraDB for Redis instance. | Run the following commands based on your needs in the decompressed redis-cli directory:
|
Procedure
Linux
Windows
Only 64-bit Windows operating systems are supported.
Common connection errors
Error message | Cause and solution |
---|---|
(error) ERR illegal address |
A whitelist is not configured as required. For more information, see the Workflow section of this topic. |
(error) ERR client ip is not in whitelist |
|
|
The password is invalid. Specify the correct password in a valid format. The password
format varies with the account type.
Note
|