Second, Redis command line and configuration file redis.windows.conf

Source: Internet
Author: User

One, the Redis sends the command two kinds of ways

Redis-cli-h localhost-p 6379
Redis-cli Ping return Pong proven normal

Second, the command return value

1, status reply, such as ping command

2, error reply, such as random input arbitrary command

3, Integer replies, such as some commands will return an integer, incr (Increase), decr (Decrease), dbsize (returns the current number of keys)

4, string reply, such as Get command, wrapped in double quotation marks, when the requested key does not exist will get an empty result, return (nil)

5, multi-line string reply, such as keys *, return so the name of the key

Three, multiple databases

Redis is a dictionary-structured storage server, and a Redis instance provides multiple dictionaries where the client can specify which dictionary to store the data on. Each dictionary can be understood as a separate database.

Each database is named after an incremental number starting at 0, and Redis supports 16 databases by default.

Different points of Redis to other relational databases:

1, custom names are not supported. Only use (0-15)
2. Setting different access permissions for each database is not supported.
3, multiple databases are not completely isolated, such as flushall can empty an instance of all the libraries.

How to switch databases:

Using the Select <dbid> command

Iv. Modifying the number of databases supported by Redis by default

The default number of Redis databases can be modified in the redis.windows.conf file under the installation directory.

Second, Redis command line and configuration file redis.windows.conf

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.