All Products
Search
Document Center

Tair (Redis® OSS-Compatible):Connect to an instance

Last Updated:Mar 28, 2026

Tair (Redis OSS-compatible) supports three connection methods: password-only, account and password, and password-free. Choose the method that fits your security requirements and deployment setup.

Prerequisites

Before you begin, make sure that:

  • The IP address or CIDR block of your client is added to a whitelist of the instance. See Configure whitelists

Choose a connection method

MethodWorks withRequires
Password-onlyDefault account onlyPassword
Account and password (recommended)Default account and standard accountsUsername + password
Password-freeDefault account only (internal endpoint, same VPC)Password-free access enabled on the instance

Password-only

Connect using only a password — no username. This method works the same way as connecting to open source Redis.

Applies to: Default account only. Standard accounts are not supported.

The username of the default account is the instance ID (for example, r-bp1jpghfglv6******) or default. Check the Account Management page in the console to find your default account.

Limitation: An instance has only one default account. If multiple applications connect to the same instance, they all share the same account. To isolate access per application, use account and password instead.

redis-cli:

redis-cli -h r-bp1zx****.redis.rds.aliyuncs.com -p 6379 -a Rp829dlwa

Account and password (recommended)

Connect using a username and password. Separate the username and password with a colon: user:password.

Applies to: Default account and standard accounts. No restrictions.

This method lets you create multiple accounts for one instance and assign each application a separate account — keeping data access isolated and auditable. See Create and manage database accounts.

redis-cli:

# Format 1: user:password
# Supported by all Tair and Redis Open-Source Edition instances
redis-cli -h r-bp1zx****.redis.rds.aliyuncs.com -p 6379 -a testaccount:Rp829dlwa
# Format 2: AUTH user password
# Supported by Tair and Redis Open-Source Edition instances compatible with Redis 6.0 and later
redis-cli -h r-bp1zx****.redis.rds.aliyuncs.com -p 6379
AUTH testaccount Rp829dlwa

Tool-specific notes:

  • Redis Desktop Manager (RDM): Enter the password in user:password format.

  • Data Management (DMS): Enter the username and password in separate fields (labeled database account and password).

Password-free

Connect without a username or password. After enabling password-free access on the instance, any client in the same virtual private cloud (VPC) can connect directly using the internal endpoint.

Applies to: Default account over the internal endpoint. Grants read and write permissions upon connection.

Requirements:

  • The client must be in the same VPC as the instance.

  • Password-free access must be enabled on the instance. See Enable password-free access.

By default, all clients in the same VPC can connect using this method. You can use the #no_loose_check-whitelist-always parameter to control whether to check that the IP address of a client is added to a whitelist of the instance. If your security policy requires stricter access control, use the account and password method instead. See Parameters that can be configured for Tair instances and Parameters that can be configured for Redis Open-Source Edition instances.

redis-cli:

redis-cli -h r-bp1zx****.redis.rds.aliyuncs.com -p 6379

Verify the connection

After connecting, run a read/write test to confirm the connection works:

r-bp1zx****.redis.rds.aliyuncs.com:6379> SET testkey "hello"
OK
r-bp1zx****.redis.rds.aliyuncs.com:6379> GET testkey
"hello"
r-bp1zx****.redis.rds.aliyuncs.com:6379> DEL testkey
(integer) 1

SET returns OK and GET returns the value you set. DEL returns (integer) 1, confirming the key was deleted. If all three commands succeed, your connection and permissions are working correctly.

Troubleshooting

If you forget your password or have not set one, reset or set it from the console. See Change or reset the password.

Common errors:

Error messageCause and solution
(error) ERR invalid passwordThe password is incorrect. Check the format for the connection method you are using.
(error) WRONGPASS invalid username-password pairThe username or password is incorrect. For account and password logon, make sure the format is user:password.

If the connection fails with no error from Redis (for example, connection refused or timeout), use connection diagnostics to check whitelist configuration and network reachability.

What's next