10_Redis_Multiple databases

One: Concept:
  A Redis instance can include multiple databases, and the client can specify which database to connect to a redis instance, just like creating multiple databases in a mysql, and the client specifies which database to connect to when connecting.

  A Redis instance can provide up to 16 databases, with subscripts ranging from 0 to 15. The client connects to database No. 0 by default . You can also select which database to connect to, as follows to connect to database No. 1:

  

  Connect to database 0:

  

  Move the key of the current library to library 1: move newkey 1

  

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324985664&siteId=291194637