mongodb4.0, modify bin\mongod.cfg in the installation directory to enable user authentication, and it succeeds on win10:
security:
authorization: enabled
But on win2008 r2, the 1053 error always appears. After many tests on Baidu, it is enough to add double quotation marks to enabled.
security:
authorization: "enabled"
If this article is helpful to you, please leave me a message. Thank you!