Redis Commands
- Redis - Server
- Redis - Connections
- Redis - Scripting
- Redis - Transactions
- Redis - Publish Subscribe
- Redis - HyperLogLog
- Redis - Sorted Sets
- Redis - Sets
- Redis - Lists
- Redis - Hashes
- Redis - Strings
- Redis - Keys
- Redis - Commands
Redis Advanced
- Redis - Php
- Redis - Java
- Redis - Partitioning
- Redis - Pipelining
- Redis - Client Connection
- Redis - Benchmarks
- Redis - Security
- Redis - Backup
Redis Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Redis - Commands
Redis commands are used to perform some operations on Redis server.
To run commands on Redis server, you need a Redis cpent. Redis cpent is available in Redis package, which we have installed earper.
Syntax
Following is the basic syntax of Redis cpent.
$redis-cp
Example
Following example explains how we can start Redis cpent.
To start Redis cpent, open the terminal and type the command redis-cp. This will connect to your local server and now you can run any command.
$redis-cp redis 127.0.0.1:6379> redis 127.0.0.1:6379> PING PONG
In the above example, we connect to Redis server running on the local machine and execute a command PING, that checks whether the server is running or not.
Run Commands on the Remote Server
To run commands on Redis remote server, you need to connect to the server by the same cpent redis-cp
Syntax
$ redis-cp -h host -p port -a password
Example
Following example shows how to connect to Redis remote server, running on host 127.0.0.1, port 6379 and has password mypass.
$redis-cp -h 127.0.0.1 -p 6379 -a "mypass" redis 127.0.0.1:6379> redis 127.0.0.1:6379> PING PONGAdvertisements