Redis有没有多个数据库和账号系统的概念?
过去多啦不再A梦
过去多啦不再A梦 2017-04-25 09:02:30
0
3
748

我是前端,数据库小白,最近在学习MySQL和Redis。

学习Redis的时候懵逼了,因为它和MySQL完全不一样。

我指的不是SQL和NoSQL的区别,是我完全没有发现Redis有账号的概念和创建数据库的概念。难道Redis只有一个账号和一个数据库吗?

过去多啦不再A梦
过去多啦不再A梦

reply all(3)
滿天的星座
  1. No account, only a lightweight auth password authentication

/etc/redis.conf

requirepass myPassword
  1. There is no database similar to mysql, only key/value database, which is equivalent to each key being a database, and then value can correspond to N types, strings, lists, sets, etc.

曾经蜡笔没有小新

Multiple databases: yes, switch by select

User: None

Another more recommended usage is that if you really have multiple "database" needs, you can run multiple redis instances at the same time to divide them

巴扎黑

Redis does not have the concept of an account. Only Host and Port are needed to connect to the Redis server.

Redis is an in-memory database, but Redis will persist the data in the memory to the disk regularly. As for the circumstances under which Redis will persist the data to the disk, it can be configured in the configuration.

When Redis starts, the files on the disk will be read into the memory.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!