Deprecated since version 2.6: Use db.dropUser() instead of db.removeUser()
定义
db.removeUser(username)从数据库中删除指定的用户名。
The
db.removeUser()method has the following parameter:Parameter类型说明username字符串
数据库用户名。
兼容性
此方法可用于以下环境中托管的部署:
重要
This command is not supported in MongoDB Atlas clusters. For information on Atlas support for all commands, see Unsupported Commands.
MongoDB Enterprise:基于订阅、自我管理的 MongoDB 版本
MongoDB Community:源代码可用、免费使用且可自行管理的 MongoDB 版本