MongoDB Global,startuplog

Source: Internet
Author: User
Tags auth

1,show logs (Ruiy see some people do something like shit, come to gas!!! )

Show global (view login MongoDB record), startupwarnings

2, Help command Help,db.help ()

3, create test database, set collection, test insert data, query data

4. Insert data into the collection (data format is in Python dict format) and query all data

5,mongodb Database Account

RIP Plain English "MongoDB database by default no user name and password, as long as the connection on the service, you can log in, do all the operation", you do not configure Conf, do not--auth, it does not?

About MongoDB account Permissions Ruiy Tips

01, through the configuration file Auth=true (some small partners need to note that your MongoDB did not conf it)MongoDB Open login Authentication

02, only switch to the admin database, add the account is the Administrator account (the Administrator account can be all the MongoDB database operation, but the default only for the admin database from the operation, to manage all databases, you need to first Admin database for authentication db.auth(' Ruiy ', ' 321 '))

03, set the account is read-only permission

Actual combat

5.01 creating a MongoDB general account

5.02 Creating MongoDB SuperUser

Above example, below actual combat

MongoDB Global,startuplog

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.