Redis - Server Client Setname Command


Advertisements

Redis CLIENT SETNAME command assigns a name to the current connection. The assigned name is displayed in the output of CLIENT LIST so that it is possible to identify the client that performed a given connection.

Return Value

Simple string reply, OK if the connection name was successfully set.

Syntax

Following is the basic syntax of Redis CLIENT SETNAME command.

redis 127.0.0.1:6379> CLIENT SETNAME connection-name

Example

redis 127.0.0.1:6379> CLIENT SETNAME "my connection"  
OK 
redis_server.htm
Advertisements