You can connect to a TencentDB for Redis instance by using a client tool, the data management console (DMC), and SDKs supporting various programing languages.
A CVM instance can be used to access the private network address that is automatically assigned to a TencentDB instance. This connection method relies on the high-speed private network of Tencent Cloud and features low delay. Both instances should be under the same account in the same VPC in the same region, or both in the classic network.
- CVM and TencentDB instances in different VPCs (under the same or different accounts in the same or different regions) can be interconnected over private network through Peering Connection.
- TencentDB for Redis doesn't support public network address currently. To connect to TencentDB for Redis instances over public network, please see iptables Forwarding.
yum install redis -y
Complete!is displayed, the client is installed successfully.
If your instance is password-free, the connection command should be as follows:
redis-cli -h IP address -p port
If your instance is password-protected, the following open-source connection format is supported:
redis-cli -h IP address -p port -a password
For example, if the password you set is
abcd1234, the connection command should be as follows:
redis-cli -h IP address -p port -a abcd1234
For instances purchased before January 2018, you need to replace the "password" with "instance ID:password" to access the instance.
redis-cli -h IP address -p port -a crs-bkuza6i3:abcd1234
If you use a custom account when connecting, then the authentication method of the custom account is
account name@password, which acts as the password parameter for accessing TencentDB for Redis:
redis-cli -h IP address -p port -a account name@password
You can use Tencent Cloud DMC to access TencentDB for Redis instances, manipulate databases and tables, manage instance sessions, monitor instances in real time, view InnoDB lock waits, and use the SQL window.
For more information, please see SDK Connection.