From getting started to improving MongoDB [set 2] --------- MongdoDB permission settings

Source: Internet
Author: User
In the previous episode, we reviewed the MongoDB installation and common configuration files. for development purposes, my configuration files are enough. The reason for choosing MongoDB is not to mention only one installation, but also the advantages. It is more convenient to uninstall MongoDB, and you will not know the other advantages. A little nonsense. Today

In the previous episode, we reviewed the MongoDB installation and common configuration files. for development purposes, my configuration files are enough. The reason for choosing MongoDB is not to mention only one installation, but also the advantages. It is more convenient to uninstall MongoDB, and you will not know the other advantages. A little nonsense. Today

Overview

In the previous episode, we talked about MongoDB installation and common configuration files, which are generally used for development. My configuration files are enough. The reason for choosing MongoDB is not to mention only one installation, but also the advantages. It is more convenient to uninstall MongoDB, and you will not know the other advantages. A little nonsense. What I bring to you today is MongoDB permission settings.

Body begin .....

The Authority is disabled by default, but the official reminder is that we are running in a trusted environment, but this concept is vague, for security purposes, I still think the settings are better.

To enable permission verification, you only need to add auth = true to the configuration file of the previous set.

Next we will go to the specific environment configuration and testing.

  

Is it very simple, but it is difficult to use the admin database every time and then transfer it to another data in the U.S. space, so we added a user to the testDB database.

Ctrl + c

In this way, we can directly verify the operation in mongoDB shell. We will try it out for the Hong Kong virtual host and Hong Kong server.

----------------------------------- Oh, I forgot to set the user's read and write permissions.

Ctrl + c

It should be similar. If you haven't written anything, please point it out.

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.