Difference between revisions of "Redis-cli"

From wikieduonline
Jump to navigation Jump to search
Line 24: Line 24:
 
Backups:
 
Backups:
 
  [[redis-cli --rdb]] /tmp/dump.rdb
 
  [[redis-cli --rdb]] /tmp/dump.rdb
 
redis-cli [[DBSIZE]]
 
(integer) 0
 
  
 
  redis-cli LPUSH mylist a b c d
 
  redis-cli LPUSH mylist a b c d
Line 39: Line 36:
 
  redis-cli --raw INCR mycounter
 
  redis-cli --raw INCR mycounter
 
  3
 
  3
 
redis-cli PING or redis-cli [[ping]]
 
PONG
 
  
  
  redis-cli -x SET net_services < [[/etc/services]]
+
redis-cli -x SET net_services < [[/etc/services]]
  
  
 +
== Errors ==
 
  redis-cli
 
  redis-cli
 
  Could not connect to Redis at 127.0.0.1:[[6379]]: [[Connection refused]]
 
  Could not connect to Redis at 127.0.0.1:[[6379]]: [[Connection refused]]
 
   
 
   
 
  Solution: [[brew install redis]] && [[brew services restart redis]]
 
  Solution: [[brew install redis]] && [[brew services restart redis]]
 
 
[[redis-cli help]]
 
  
  

Revision as of 10:08, 30 September 2022

Advertising: