Drop a database in MongoDB

http://www.linuxask.com/questions/drop-a-database-in-mongodb

Answer:

Assuming you are going to drop the `test` database in MongoDB, follow the steps below to drop (delete) it.

>  use test
switched to db test

> db.dropDatabase()
{ "dropped" : "test.$cmd", "ok" : 1 }

Related posts:

  1. Drop a collection in MongoDB
  2. Drop all tables in MySQL database
  3. Repair and compact database in MongoDB
  4. How to get the total database index size of my MongoDB
  5. Select a document in MongoDB
时间: 2024-10-16 04:36:31

Drop a database in MongoDB的相关文章

[Hive - LanguageManual] Create/Drop/Alter Database Create/Drop/Truncate Table

Hive Data Definition Language Hive Data Definition Language Overview Create/Drop/Alter Database Create/Drop/Truncate Table Alter Table/Partition/Column Create/Drop/Alter View Create/Drop/Alter Index Create/Drop Function Create/Drop/Grant/Revoke Roles

MongoDB Database Profiling

MongoDB Database Profiling MongoDB Profiler是一个捕获数据库执行活动的系统,它可以帮助识别慢查询和操作. Profiling级别 可用的捕获级别意义如下: 级别 设置 0 禁用 1 启用,只记录慢操作 2 启用,记录所有操作 查看Profiling级别 > db.getProfilingLevel() 启用Profiler > db.setProfilingLevel(1) 完整命令为: db.setProfilingLevel(level,slowm

mongodb笔记1

参考链接: https://docs.mongodb.com/manual/reference/method/db.createUser/#create-administrative-user-with-roles Linux下安装mongodb 下载: curl -O https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.0.6.tgz 解压: tar -zxvf mongodb-linux-x86_64-3.0.6.tgz 将解压包拷

MySQL vs. MongoDB: Choosing a Data Management Solution

原文地址:http://www.javacodegeeks.com/2015/07/mysql-vs-mongodb.html 1. Introduction It would be fair to say that as IT professionals we are living in the golden age of data management era. As our software systems become more complex and more distributed,

saltstack 配置mongodb作为后台存储pillar,自动化安装mongodb,创建mongodb用户

## saltstack 学习记录 配置文件 $ cat /etc/salt/master.d/10-master.conf user: root interface: 127.0.0.1 ipv6: False worker_threads: 10 hash_type: sha256 log_level_logfile: debug log_level: info default_top: base cli_summary: false state_output: changes $ cat 

MongoDB for Java入门

Introduction This page is a brief overview of working with the MongoDB Java Driver. For more information about the Java API, please refer to the online API Documentation for Java Driver. A Quick Tour Using the Java driver is very simple. First, be su

DB Intro - MongoDB Basic

mongoDB basic from:http://www.tutorialspoint.com/mongodb prject:https://github.com/chenxing12/l4mongodb overview getting-start collection dataType insert find Overview MongoDB is a cross-platform, document oriented database that provides, high perfor

mongodb导出导入

数据库都分为冷备份与热备份,所谓的冷备份就是停库,然后把数据拷贝:热备份就是使用相应工具,在数据库运行时做备份.每种库都会有自己的热备份工具,mongodb也不例外. mongodb的备份主要有热备和冷备. 一,冷备: 停止mongodb服务,直接copy数据目录:启动mongodb时,可以用--dbpath指定自己设置的数据库存储目录. 二,热备: 用mongodump来做MongoDB的库或表级别的热备份. 认识一下mongodump, [[email protected] mongodb]

MongoDB的安装及常用操作

MongoDB MongoDB简介 MongoDB是一款跨平台面向文档的数据库.可以实现高性能.高可用性,并且能够轻松扩展.是一个基于分布式文件存储的开源数据系统,在高负载的情况下,添加更多的节点,可以保证服务器性能. MongoDB也是也是一个介于关系数据库和非关系型数据库之间的产品,是非关系型数据库中功能最丰富.最像关系型数据库的.MongoDB不在有"行"的概念,其运行方式主要两个概念:集合(collection)与文档(document). MongoDB的特点 MongoDB