Redis - Username, password and db?

删除回忆录丶 提交于 2019-12-25 10:32:49

问题


Is it possible to use username, password and db in Redis?

The reason for this question is because in the official pyramid_redis_sessions documentation ( http://pyramid-redis-sessions.readthedocs.io/en/latest/gettingstarted.html ) the parameter...

redis.sessions.url = redis://username:password@localhost:6379/0

... (to use inside a Python/Pyramid production.ini, for example) suggests the use of username, password and db.

However I have not found anything on the internet that explains how to create a user and password linked to a db on Redis. In the link https://stackoverflow.com/a/34781633/3223785 there is some information about using a db (Redis).

There is the possibility of creating a password ( https://stackoverflow.com/a/7548743/3223785 ). But it seems that is a scope of use other than the parameter redis.sessions.url.

NOTE: The pyramid_redis_sessions provides a implementation of Pyramid’s ISession interface, using Redis as its backend.

@Jacky


回答1:


In the Redis, the AUTH command is used to authenticate to the Redis server. Once a client is authenticated against a server, it can switch to any of the DBs configured on there server. There is no inbuilt authentication against a specific database.



来源:https://stackoverflow.com/questions/46044489/redis-username-password-and-db

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!