How to reset mongodb database?

Questions Mongodb noob!

I want to do something similar to rake db: drop, but in mongodb, to clear the contents of my document.

So far I have found the db.dropDatabase () command, but is it true that I have to enter it from the mongodb interactive shell? (Any advice on how to enter the shell would be appreciated, I tried to follow the instructions on the Mongodb website, but I could not start it and start it).

Is there an easier way to do this from the command line?

Edit : I tried typing mongo, and the shell went beyond lol.

+3
source share
2 answers

rake db: mongoid: drop

it will work

+7
source

All Articles