I am using iron router and unfortunately every time i cd into a directory generated by iron cli,i am notified i am not in a meteor directory.
So i have tried iron mongo and opens
> meteor mongo
MongoDB shell version: 2.6.7
connecting to: 127.0.0.1:3001/meteor
but has been this way for the last five minutes. Is there an alternative way to access the mongodb that comes with meteor or what should be done incase you are using iron router?.
In my case,i just want to see how many collections i have like
show collections
I think is best way for you it is use some Admin UI. Check "mongodb admin ui" in google for variants.
For my part I can recommend:
Robomongo
Its is really perfect mongo manager. Native and cross-platform MongoDB manager
Whatever platform you use today — Robomongo is available for you. Distributed as a native application, fast and snappy Robomongo uses very little of your machine resources.
But if you find some critical for you bugs, try another perfect tool
MongoVUE
MongoVUE is an innovative MongoDB desktop application for Windows OS that gives you an elegant and highly usable GUI interface to work with MongoDB. Now there is one less worry in managing your web-scale data.
Grab the local mongo connection string first then connect as follows
God#God-HP-EliteBook-2540p:~/crud$ iron mongo
> meteor mongo
MongoDB shell version: 2.6.7
connecting to: 127.0.0.1:3001/meteor
^C
God#God-HP-EliteBook-2540p:~/crud$ mongo mongodb://127.0.0.1:3001/meteor
Feed commands
God#God-HP-EliteBook-2540p:~/crud$ mongo mongodb://127.0.0.1:3001/meteor
MongoDB shell version: 3.2.4
connecting to: mongodb://127.0.0.1:3001/meteor
meteor:PRIMARY> show collections
Cannot use 'commands' readMode, degrading to 'legacy' mode
crud
meteor_accounts_loginServiceConfiguration
roles
system.indexes
users
meteor:PRIMARY> show dbs
admin (empty)
local 0.063GB
meteor 0.031GB
meteor:PRIMARY>
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 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
To run Meteor without Mongo, a dummy MongoDB server is needed. Obviously, one solution is to run mongod locally, or launch a mock MongoDB server.
What other ways are there to connect to a dummy MongoDB server for testing purposes?
Any Mongo hosting providers that have put up a dummy/test server, basically a /dev/null over mongodb://?
mongolab has that in their free sandbox level.
compose.io also has a free sandbox level.
search for 'mongo sandbox' or 'mongo free'.
the local mongo (on osx) is invaluable; don't know about wind blows.
I have started looking at Meteor and tried out some examples, but I'm puzzled by something: I have installed Meteor and not MongoDB on my machine, but Meteor seems to create its own instance of MongoDB.
How does this work?
Am I able to develop a separate application that can also perform CRUD operations on this database that Meteor is spinning up?
Meteor is shipped with a MongoDB installation
I think you can. The meteor mongo command gives the MongoDB URL to the database Meteor spins up.
meteor command will start its own instance of MongoDB.
You can then use meteor mongo to connect to the MongoDB database, which is usually running on the application's port+1, for example, app:3000 -> mongodb#:3001. So you could use any MongoDB tool to connect (for example, robomongo).
$ meteor mongo
MongoDB shell version: 2.4.9
connecting to: 127.0.0.1:3001/meteor
I'm new to both Meteor.js and MongoDB and after installing Meteor in the official way described I wonder how to connect to my MongoDB.
MongoDB was installed by Meteor during the installation and everything works fine but now I would like to have a look into it with another tool (like RazorSQL) to see what's in there.
But the standard connection parameters (localhost:27017) doesn't work, what can I do? Login? Password?
Update: February 2014 - Meteor 0.7.1 - The meteor port has been shifted to 3001 instead of 3002. So instead of adding two to the port meteor runs on, you add 1 instead.
MongoDB's database is installed in the meteor package containing your files in a hidden folder called .meteor. To access it from a remote tool simply add 2 to whatever your web server port is while meteor is running. It will be stored in the meteor database
e.g
http://localhost:3000 would have its mongodb server running at mongodb://localhost:3002/meteor there is no username/password on this instance if you ran it with meteor or meteor run
To get the Meteor Mongo url and port, first run your Meteor app using meteor run then run meteor mongo in a different terminal tab. You should see an output like this
[meteor-app] meteor mongo
MongoDB shell version: 2.6.7
connecting to: 127.0.0.1:3001/meteor
this means that your Meteor Mongo is running at 127.0.0.1:3001.
If you are running your Meteor app with meteor run then you neither need username/password nor authentication configuration just make sure that you set your default database name as meteor