mongodb 的 local 库怎么做用户验证
巴扎黑
巴扎黑 2017-05-02 09:19:48
0
1
583

如题。 local 是不能添加用户的,如果在 shell 可以在 admin 下完成验证再切到 local 库。在应用里应该怎么写呢?

巴扎黑
巴扎黑

reply all(1)
Ty80

I don’t know what language you are using, but currently the drivers of various languages ​​support database switching, which means that the database separation of authentication and operation can be achieved. You can select admin for authentication when connecting to the database, and then switch to the local database for operations after connecting. Note, make sure that your user in the admin has permission to operate the local database!

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!