After mongodb turns on authentication, only the user name and password need to be entered for the first time, then the shutdown service is restarted, and the user name and password need not be entered for database operation. How should it be solved?
Thank you ~
The mongodb server also needs to add an auth parameter at startup, as written in the document
Run the database (mongod process) with the --auth option to enable security. You must either have added a user to the admin db before starting the server with --auth, or add the first user from the localhost interface.
I also think this design is very strange, why not take it by default?