-
Notifications
You must be signed in to change notification settings - Fork 34
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
Switch to and query database other than authentication database #46
Comments
Can you make another connection:
|
Hi all, Is it possible in RMongo to query against a non-admin authentication database? I had this issue with mongolite as well, and tried using RMongo as a solution, and believe I am having the same issue. I have a database, collection, and documents already created (I don't want to insert anything myself)—is there a way for me to query that collection (which I did not create myself), without being an admin? Thank you, |
Can you list the commands you tried? I think it should work. |
I tried:
I assumed this had something to do with the fact that I was using a connection made in mongolite rather than in RMongo, so I tried making a connection in RMongo, and did this:
|
Resolved, thank you for your help! |
Can you leave your solution so it can help others? |
Not sure how to resolve in RMongo, but in mongolite, the mongo() must have a database and a collection as parameters, whereas the URL that mongo() takes in uses the authentication database. All different things, and all need to be included. RMongo connects to databases slightly differently, so I don't know how to work around that. Sorry this was unhelpful for RMongo. |
Hi,
I am using RMongo to connect to MongoDB.
However, I want to switch to another database called
test
and query it. How can I do that?Thanks,
Komal
The text was updated successfully, but these errors were encountered: