I'm trying to manage my MongoDB databases through the GUI interface, but I don't how to set up it correctly. At the moment I'm using docker to set up all the necessary and I'm connecting through the command
mongo --host "localhost:27017,localhost:27016".
Now, when I open MongoDB Compass, it ask me for a string of this format:
How can I format my IP correctly?
As #super said, the answer was just mongodb://localhost:27017
Related
i installed MongoDB compass and when i try to connect with hostname localhost ,Port: 27017
i receive this error: connect ECONNREFUSED 127.0.0.1:27017.
I also looked in Task manager and MongoDB was not running. Thank you for your help
MongoDB compass is only a client. you should install the mongo community edition (for development setup) and then use compass client to access it.
https://docs.mongodb.com/manual/installation/
MongoDB compass is graphical user interface (GUI) for the actual mongoDB. That is to say, you need an actual mongoDB running in order to be able to interact with the data through the GUI.
Once you have the database install, you can start it by typing the command mongo in the shell. There after you should be able to return to mongoDB compass and view the data in you database (I should mention, I'm assuming that you're running on the default port and on your local machine).
I'm new to mongodb, and learning as i'm going. In my new team there isn't much documentation so i'm filling in gaps myself
There is mongodb set up that i finally managed to resolce access issues to and connect to with mongodb command line via the connection string below. (And based on my understanding, the community version of mongodb does not support this, i needed to use some server enterprise version which thankfully was free)
While i have minimum access to db now, it is quite a hassle to work with just the command line
mongo.exe
"mongodb://serv1.unix.me:10001,serv2.unix.me:10002,serv3.unix.me:10003/abc?replicaSet=example"
--authenticationMechanism=GSSAPI --authenticationDatabase=$external --username "user#testdomain.me.com" --password "pAssw0rd!" -ssl --sslCAFile C:\files\ca.pem
I have Robo3T - 1.3 but no matter how many times i try to apply above connection string into the robo3t connection window, i keep getting various errors.
Part of me is worried that i need to use the enterprise version of robo3t (which isn't free)
Can anyone give some advice?
I have installed MongoDB Compass, it is installed in here:
C:\Users\User\AppData\Local\MongoDBCompass
And I'm trying to connect to Atlas Cluster, using the string which is:
mongodb+srv://my_id:<password>#cluster0-8vu0e.mongodb.net/test
I typed this in cmd and I get the following error:
The system cannot find the file specified.
I tried to the directory into path but I don't think it worked, I'm still getting an error.
What could be the issue?
Thank you in advance!
That happened to me once and it m8ght be because off the whitelist of mongo atlas.
https://docs.atlas.mongodb.com/security-whitelist/
You Can Follow This Code
mongodb+srv://my_id:usingPasswordThisPlaceMongoDBPassword#cluster0-8vu0e.mongodb.net/test
like:
mongodb+srv://my_id:12345#cluster0-8vu0e.mongodb.net/test
**When MongoDB Compass Open...Past Your Url And press Connect Button.**
Try connecting it with the standard connection string instead of the srv connection string.
You can find the standard connection string in the Atlas UI itself. while selecting for the connection string in the drop down menu of the mongoshell version select 3.4 or earlier then it will give you a connection string which is the standard one like below:
mongo "mongodb://cluster2-shard-00-00.dmku2.mongodb.net:27017,cluster2-shard-00-01.dmku2.mongodb.net:27017,cluster2-shard-00-02.dmku2.mongodb.net:27017/test?replicaSet=atlas-1ehx3j-shard-0" --ssl --authenticationDatabase admin --username <username> --password <password>
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!
I'm sorry for this (peraphs) stupid question ... I install meteor and mongodb in my windows computer and i start to write some apps. I don't understand how to use mongo for shoving my db app ... i open one shell in my app dir and launch mongod, in one more shell in the same folder i start mongo.
show dbs
local
use local
switched to db local
show collections
startup_log
system.indexes
Where are my collections? Where is users collection?
When your app is running use this command on a separate command line mongo 127.0.0.1:3001
Meteor keeps the collections in this server. After you run mongo on this server, by writing use meteor you can use db specific to your running app. And then you can display your collections with db.getCollectionNames()
Meteor uses a library called Minimongo that's why it doesn't display if you run show dbs on your mongo shell.
By default it points to port 3001 hence if you are using Robomongo you can just make the set up to watch that port.
To display all your MongoDB collections using the shell, you may check this answer:
How to list all collections in the mongo shell?
You may also use a MongoDB GUI Tool such Robomongo