Redis - Server Config Set Command



Redis CONFIG Set command is used in order to reconfigure the server at run time without the need to restart Redis. You can change both trivial parameters or switch from one to another persistence option using this command.

Return Value

String reply – OK, when the configuration is set properly. Otherwise, an error is returned.

Syntax

Following is the basic syntax of Redis CONFIG Set command.

redis 127.0.0.1:6379> CONFIG Set parameter value 

Example

redis 127.0.0.1:6379> CONFIG Get "requirePass"  
"" 
redis 127.0.0.1:6379> CONFIG Set "requirePass" "pass1"  
OK
redis_server.htm
Advertisements