When pulling the project from Gitee to run locally, this error occurs for the following reasons:
- wrong user name or password.
- The user is not connected to the correct database.
- The MongoDB service does not have authentication enabled, you need to use the --auth option to enable authentication at startup.
- For MongoDB 4.0 and above, the SCRAM-SHA-256 authentication mechanism is not enabled, or the wrong authentication mechanism is used on the C side, such as MONGODB-CR.
The first point is the most likely, because you don’t know whether your local Mongo database has login authentication enabled, just delete the circled place