RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
mongodb验证登录

MongoDB  验证登录

创新互联服务项目包括海北州网站建设、海北州网站制作、海北州网页制作以及海北州网络营销策划等。多年来,我们专注于互联网行业,利用自身积累的技术优势、行业经验、深度合作伙伴关系等,向广大中小型企业、政府机构等提供互联网行业的解决方案,海北州网站推广取得了明显的社会效益与经济效益。目前,我们服务的客户以成都为中心已经辐射到海北州省份的部分城市,未来相信会继续扩大服务区域并继续获得客户的支持与信任!

Start MongoDB without access control.

mongod --port 27017 --dbpath /data/db1

Connect to the instance.

For example, connect a mongo shell to the instance.

mongo --port 27017

Create the user administrator.

In the admin database, add a user with the userAdminAnyDatabase role. For example, the following creates the user myUserAdmin in the admin database:

use admin

db.createUser(

  {

    user: "myUserAdmin",

    pwd: "abc123",

    roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]

  }

)

restart mongodb instance

mongod --auth --port 27017 --dbpath /data/db1

mongo --port 27017 -u "myUserAdmin" -p "abc123" --authenticationDatabase "admin"


网页名称:mongodb验证登录
本文地址:http://scyingshan.cn/article/pipdjc.html