Mongodb验证管理员权限


 description

通过mongo外部后进行身份验证admin用户身份

 command

mongo
use admin
db.auth('username','password')

 parameter

auth(<username>, <password>) : 允许用户从外部程序内对数据库进行身份验证。

 result

1

I hope to help every developer quickly find the commands they need. Of course, you can also add your own commonly used commands for easy searching.