When creating a user from the MongoDB command line, the following error is reported:
db.addUser(“lisi”,”123456″);
2016-11-04T19:41:02.563+0800 E QUERY [thread1] TypeError: db.addUser is not a function:
The addUser() method is no longer supported in the mongdb3.x version and is replaced by the createUser() method.
See the section on creating users in the official documentation:
https://docs.mongodb.com/manual/reference/method/js-user-management/
When you add a new user, you can specify the user’s role. Refer to the built-in roles section of the official documentation:
http://docs.mongoing.com/manual-zh/reference/built-in-roles.html
http://www.cnblogs.com/SamOk/p/5162767.html (with Chinese translation)
db.addUser(“lisi”,”123456″);
2016-11-04T19:41:02.563+0800 E QUERY [thread1] TypeError: db.addUser is not a function:
The addUser() method is no longer supported in the mongdb3.x version and is replaced by the createUser() method.
See the section on creating users in the official documentation:
https://docs.mongodb.com/manual/reference/method/js-user-management/
When you add a new user, you can specify the user’s role. Refer to the built-in roles section of the official documentation:
http://docs.mongoing.com/manual-zh/reference/built-in-roles.html
http://www.cnblogs.com/SamOk/p/5162767.html (with Chinese translation)
Also refer to the blog post:
http://blog.csdn.net/unixpro/article/details/47302855
Read More:
- [resolved] superset failed to create admin user: error! User already exists user or attributeerror: ‘nonetype’‘
- MongoDB Error: Failed to start mongod.service: Unit mongodb.service is masked
- Version 1.8.0_201 of the JVM is not suitable for this product. Version: 11 or greater is required.
- Start eclipse and prompt version 1.7.0_ 79 of the JVM is not suitable for this product. Version: 1.8 or greater i…
- Ubuntu “a user name is not in the sudoer folder. It will be reported. ” Solutions for
- Difference between vs code user and system version
- Eclipse specifies JDK version to start, and resolves version XXXX of the JVM is not suitable
- MongoDB Error: Failed to start mongod.service: Unit mongod.service is not loaded properly
- Error 1396 (HY000): Operation create user failed for ‘xxx’ @’xxx ‘
- [MySQL] error 1396 (HY000): Operation create user failed for ‘MySQL’ @’localhost ‘
- Error: cudaGetDevice() failed. Status: CUDA driver version is insufficient for CUDA runtime version
- Typeerror in gitbook init: cb.apply is not a function solution
- Failed to create Oracle Oracle home user solution appears in oracle12c installation
- The binary version of its metadata is 1.5.1, expected version is 1.1.16
- TypeError: this.getOptions is not a function
- Syntax error: typeerror: this.getoptions is not a function an error is reported when the. SCSS file is imported globally
- ERROR 1148 (42000): The used command is not allowed with this MySQL version
- After node.js is installed, use the instruction node version in vscode to show that it is not an external or internal instruction. The solution is as follows:
- The Excel connection manager is not supported in the 64-bit version of SSIS [Switch]
- [solved] runtimeerror: module compiled against API version 0xc but this version of numpy is 0xb