redis-cli -n 3 SET k v

Category: Databases & SQL

redis-cli -n 3 SET k v

Use a specific logical database

Redis instances host 16 numbered databases (0-15); -n 3 targets the third one, whose keys are isolated from the others. FLUSHDB clears only the selected database. Related: DBSIZE.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.