Q:

drop database mongodb command line

// First show what databases have you gotten 
show dbs
// then, use the database name that you want to drop
use YOUR_DATABASE_NAME
// now you can drop it
db.dropDatabase()
// show collections should be empty now
show collections
8
mongo <dbname> --eval "db.dropDatabase()"
2

New to Communities?

Join the community