In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article gives you an answer on how to configure MongoDb simply under Windows.
Enter the installation directory with the administrator's startup cmd
Enter: mongod-- auth-- port 3406-- dbpath= library address-- logpath= full address-- install-- serviceName "custom name"
Note: the library address can only be specified to the folder, and the LOG address should be specified to a specific file.
-- auth enable right root control
-- port designated port
-- ip specifies that IP is local if it is not specified
-- serviceName windows service name
After the completion of the above
Enter the address and port connection library configured in the previous step:
Switch to admin
Create a Super Admin account:
Restart the service:
Log in with the user you just created: db.auth ("root002", "root002")
Displaying 1 indicates that the login was successful.
You can also create users for the specified library:
Db.createUser ({user: "read", pwd: "read", roles: [{role: "read", db: "custom"}]})
Built-in roles for MongoDB:
Database user roles: read, readWrite
Database management roles: dbAdmin, dbOwner, userAdmin
Group of administrators to manage the entire system: clusterAdmin, clusterManager, clusterMonitor, hostManager
Backup and restore role groups: backup, restore
All database roles: readAnyDatabase, readWriteAnyDatabase, userAdminAnyDatabase, dbAdminAnyDatabase
Super Admin: root, (the roles dbOwner, userAdmin, userAdminAnyDatabase provide any permission for any user of any data, and users with this role can define their own permissions on any database)
Internal role, generally speaking, it is not recommended to set: _ _ system
The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.