In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article shows the syntax and use of the redis command, the code is concise and easy to understand, and it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
The Redis command is used to perform operations on the redis service.
A redis client is required to execute commands on the redis service. The Redis client is in the redis installation package we downloaded earlier.
Grammar
The basic syntax for the Redis client is:
$redis-cli
Example
The following example shows how to start the redis client:
Start the redis client, open the terminal and enter the command redis-cli. This command connects to the local redis service.
$redis-cliredis 127.0.0.1 PINGPONG 6379 > redis 127.0.0.1
In the above example, we connect to the local redis service and execute the PING command, which is used to detect whether the redis service is started.
Execute commands on remote services
If you need to execute a command on a remote redis service, we also use the redis-cli command.
Grammar
$redis-cli-h host-p port-a password
Example
The following example shows how to connect to a redis service with host 127.0.0.1, port 6379, and password mypass.
$redis-cli-h 127.0.0.1-p 6379-a "mypass" redis 127.0.1 redis > redis 127.0.1 redis 6379 > PINGPONG after reading the above, have you mastered how to use the redis command? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.