mongodb 添加用户名密码验证
来源:互联网 发布:ubuntu谷歌拼音输入法 编辑:程序博客网 时间:2024/05/21 10:59
mongo localhost -u username -p pwd --authenticationDatabase admin --authenticationMechanism SCRAM-SHA-1
db.createUser( { user: "username", pwd: "passwrd", roles: [ { role: "readWrite", db: "shujuku" }, })
shell创建用户并登录
think that auth = true
is an invalid configuration and your mongod is not starting because of it. To enable authorization, try using the following instead:
security: authorization: enabled
Then, to connect to the database, make sure that your client is using the correct authentication database and authentication mechanism. This can be done using the commmand line by the following command:
mongo localhost -u admin -p myAdminPass --authenticationDatabase admin --authenticationMechanism SCRAM-SHA-1
阅读全文
0 0
- mongodb 添加用户名密码验证
- MongoDB添加用户验证,设置用户名和密码
- mongodb 3.0.x 添加用户名和密码设置权限
- mongodb设置用户名密码
- mongodb增加用户名、密码
- mongodb设置用户名密码
- mongoDB设置用户名密码
- 验证用户名和密码
- 用户名密码验证程序
- 用户名和密码验证
- JS验证用户名密码
- HiveServer2用户名密码验证
- HiveServer2用户名密码验证
- 登陆用户名密码验证
- jsp 用户名、密码验证
- 用户名密码验证
- 用户名密码判断验证
- svn 添加用户名密码
- Doctype作用?严格模式与混杂模式如何区分?它们有何差异?
- 游戏BI数据统计分析相关
- Python自动化(六)使用xlwt操作Excel
- 《C编码实践篇》实验二——命令行菜单小程序的实现
- 全景图像展开
- mongodb 添加用户名密码验证
- 第三周项目3求集合并集
- 利用Spark mllib识别点阵文本
- SSL证书之神秘预证书
- 剑指offer——54.字符流中第一个不重复的字符
- java项目配置文件路径获取
- 音频文件的上传和合并
- centeros 升级 python 版本,以及添加pip
- CMS和G1的比较