Redis Commands: Basic and advance

Redis commands are used for performing some operation on Redis Server. You need to have a Redis consumer to run Redis command.

Start Redis Client

To begin Redis client, first go to “Program files” the place Redis is installed. Open the folder Redis and click on the “redis-server.exe”.

After that, click on on the Redis client. You will see this:

Now, you are related with local server and you can run any command.

Let’s write a command “PING”. If it returns a response “PONG” that skill you are connected.

Run Commands on the Remote Server

You can additionally connect to any other server via using redis-cli command on home windows command prompt:

Syntax

$ redis-cli -h host -p port -a password  

Example

Let’s take an instance to see how to join to Redis faraway server. Open command instant and run the following command:

redis-cli   

Now the Redis port is open. You can use the “PING” command to take a look at if it is connected.

Now you can see that the far flung server is connected to Redis.

Next TopicRedis Keys