New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to switch database #1114
Comments
to authorize your connection, include your uname + password in your connection string or in the params passed to connect: see the examples here: http://mongoosejs.com/docs/api.html#index_Mongoose-createConnection |
Thanks for reply! |
It's not supported by mongoose. A new connection is required. On Sep 24, 2012, at 8:57 PM, Rex Huang notifications@github.com wrote:
|
Had problem to connect to a mongodb - coz the auth would bring me to a specific db like "admin" (standard). But how with mongoose? Only set the authSource inside of auth option....
|
Good lord, I can't believe how hard it was to find this. Thanks @MNeundorf for saving me further hair pulling. |
other possible way is with query param in url
look here -> Support AuthSource |
@Naxmeify you save my life...! thanks! |
@Naxmeify you save my life too...! thanks! |
@naxmefy You save also my life! Thanks! |
how do i change user login portal to admin login portal on same page? |
In the mongo shell, I can do like this:
This means I pass the authurized then I can do everything.
My problem is how can I do the same work in mongoose, how can I switch db in mongonse?
Because I must enter the ADMIN db to authurize, and then chang to other db to my own manipulation
The text was updated successfully, but these errors were encountered: