The following command is used to connect redis-cli to ApsaraDB for Redis:
redis-cli -h instance connection address -a instance ID:password
Note: ApsaraDB for Redis can only be connected from ECS in the same region. It cannot be connected from ECS in other regions or through public network. This is because ApsaraDB for Redis only supports access from the intranet.