Robo3T Does not show the database - mongodb

I can connect to a MongoDB Atlas replica set but it has no database.
When I click the master node, it shows a new shell
And I can find the objects with db.getCollection('aCollection').find()
How can I show/add the database in the left pane?
ps. I was using Robo3T 1.3.1

IMO this is a issue of insufficient privileges on the user account used to log in to ROBO3T and access MongoDB. You can follow this link. It points to a similar issue on Robo3Ts Github. You can use MongoDB Compass to connect to remote/Atlas MongoDB instances too. It is much user friendly.

This worked for me. Just set MongoDB Roles to atlasAdmin#admin.

Related

How to choose MongoDB Connect to Cluster option?

I'm new to MongoDB and I'm having some problems with MongoDB recently.
I'm not sure about Connect with the MongoDB Shell, Connect your application, Connect using MongoDB Compass, what's the difference?
The current demand is. I want to directly allow connection from anywhere and create a user account password to log into this database, which option should I choose?
https://i.stack.imgur.com/iwYMf.png
In Connect your application tab, you get a link that you need to copy
and paste in your application you are building to connect it to the
database. Remember to replace your password and databse name.
In Connect using MongoDB Compass tab, you get a link that you need
to paste in your compass application(A desktop application that
makes your mongodb data handling so much easier). And again remember to replace
your credentials.
I'm not very fond of Mongodb shell. It's actually an extensible
command-line interface.

How to transfer a database from MongoDB Compass to MongoDB Atlas

I have an existing database for a discord bot in MongoDB Compass v1.28.1 I want to transfer all the data in the database to mongodb atlas because of its more extensive functionality and to not have to wait for compass to take ages to load each time I open it. However when I follow the steps to connect that are provided in Atlas, the pop-up that's supposed to appear when I copy a path to the clipboard doesn't appear, and nothing happens. I tried to connect through my app in VSCode, the same way I did for Compass, using mongoose. Still no collections are loading or any data being stored. I have made my schemas etc. which work perfectly fine in Compass...
Migration to Atlas is documented at https://docs.atlas.mongodb.com/import/
To save you some reads, you have to options - export/import and mongodump/mongorestore.
I would recommend to try export/import first. It's built into Compass https://docs.mongodb.com/compass/current/import-export/ and must be simpler to use considering limited experience with mongo. It's UI oriented so just follow the click-through guide in the documentation.
Unfortunately it has some limitations related to data type conversion from BSON to JSON and may be a bit tedious if you have large number of collections.
In this case you will need to follow CLI mongodump/mongorestore way #barrypicker suggested in the comments. Both commands are available in cmd and PowerShell consoles.
First you backup your local database https://docs.mongodb.com/v4.2/reference/program/mongodump/:
mongodump --uri="mongodb://username:password#localhost:27017/discordbot"
username and password are the ones you use in compass to connect to the source database.
It will create dump directory with all collections you have.
Then you have to upload the backup to Atlas:
mongorestore --uri="mongodb+srv://username:password#cluster.tenant.mongodb.net/database" dump/
username and password are the ones you use to connect to atlas cluster, listed in the "Security/Database Access" section.
You can get the exact subdomains for the --uri part from Atlas. In the dashboard click "Connect" button for the cluster you want to connect to, then choose "shell" as the connection method in the connection pop-up:

Mongo Shell becomes unresponsive after connecting to AWS Document DB

I created an AWS Document DB in the same region as my EC2. When I try to connect to it using the command provided by AWS the terminal seems to get stuck.
The ec2 and Document DB are in the same region.
Document DB's security group allows 27017 access.
Both are in the same VPC.
I don't understand why it says connected but then doesn't allow me to enter commands
asds_asds
You can check your working process from here https://docs.aws.amazon.com/documentdb/latest/developerguide/connect-ec2.html to see if you missed something.

Connect to Database directly via Mongo Compass

Via shell, I can directly connect to mongo database with this string
mongo --ssl host1,host2:port/MyDataBase...
And I land directly on the MyDataBase.
Is there a similar way to do it in Compass? I get connected to whole server and I can see all the other databases. I just want to connect to MyDataBase.
I am using the lattest version of Compass, so it may differ from your current version.
It is important the you are in the network of the server, or use a VPN connection, otherwise, it does not work.
Step 1
Step 2
Please,let me know if that works!

Can not access MongoDb collections on Compose.io with Mongo Client

Since last week I can not access my mongoDb collections on Compose.io using any mongo client. Client log says it is connected to DB but when I want to list collections or view document says "Collection not found!". I till can connect with terminal and do there whatever I need.
Initially I thought it is a problem with my MacOS machine, but then I tried to connect from other computers and using different clients ( Mongo-Express, MongoHub ) still no luck.
Wondering if I'm experiencing this problem alone or other compose.io clients also do ?
Tried to grant readWrite role to my mongo user as advised here (MongoDB - admin user not authorized), this does not help either.
Contacted compose.io support, but they swear that did change anything.
Any advise appreciated.
Thank you.
I was trying to connect to slave node which fails with { [MongoError: not master and slaveOk=false] name: 'MongoError' }
. Connecting with MongoClient to primary node solves the problem.