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.