Encountered problems with mongodb

I just bought a server in Aliyun these two days, and then installed my own nodejs environment and mongodb, but I encountered several problems when using mongodb.
1. The local terminal failed to connect to mongodb remotely.
2. Is mongodb enabled for user authentication, but cannot be accessed without adding a user"s library?
3. What is the use of adding userAdminAnyDatabase users to the admin library? How do I use it?
4. How to close the mongodb, direct kill process after user authentication is enabled?
I am a rookie. I hope everyone will not think that the question I asked is shallow, but it is still very urgent for me. I have also read some articles, but most of them teach how to install and use without problems, and some are more general. I hope to get help here. Thank you

Mar.12,2021

I'm here to push the official documents. Your questions are described in more detail on the official website. In fact, most people's blogs are translated after reading official documents. Although it is difficult to read English, the documentation of this kind of tools is all right, and it will be rewarding if you read it patiently. You should be able to find answers to all your questions in the Security section.
https://docs.mongodb.com/manual/security/

Menu