drop mongo database
// 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
drop mongo database
// 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
drop mongodb database
db.dropDatabase()
how to drop db in mongo shell
use DB_NAME // go to the db you want to delete
db.dropDatabase()
show dbs
// droppped db will not be shown
drop database mongodb command line
mongo <dbname> --eval "db.dropDatabase()"
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us