Day: March 6, 2019

  • 美团技术干货

    美团技术干货

    【前端系列】:http://dpurl.cn/DWVhPpS 【后台系列】:http://dpurl.cn/obtIVn 【系统系列】:http://dpurl.cn/zTDWq8Q 【算法系列】:http://dpurl.cn/ODj5qAB 【运维系列】:http://dpurl.cn/6zjgHFj 【测试系列】:http://dpurl.cn/wfKQqy 【工程师成长系列】:http://dpurl.cn/p5sPoKT 【2018美团点评技术文章合辑】:http://dpurl.cn/iLGBtuS

  • 删除mongodb 的默认test库 db.dropDatabase() 方法

    删除mongodb 的默认test库 db.dropDatabase() 方法

    db.dropDatabase() 方法 MongoDB中的 db.dropDatabase()命令用于删除现有的数据库。 db.dropDatabase() Shell 这将删除当前所选数据库。 如果没有选择任何数据库,那么它将删除默认的’test‘数据库。 示例 首先,使用命令show dbs检查可用数据库的列表。 >show dbs local 0.00025GB newdb 0.0002GB test 0.00012GB > Shell 如果要删除新数据库<newdb>,那么dropDatabase()命令将如下所示: >use newdb switched to db newdb >db.dropDatabase() >{ “dropped” : “newdb”, “ok” : 1 } > Shell 现在检查数据库列表,如下 – >show dbs local 0.00025GB test 0.0002GB >