show dbs show database names show collections show collectionsincurrent database show users show usersincurrent database show profile show most recent system.profile entrieswithtime>=1ms show logs show the accessible logger names show log[name]prints out the last segmentofloginmemory,'global'isdefau...
show collections show collections in current database show users show users in current database show profile show most recent system.profile entries with time >= 1ms use <db name> set curent database to <db name> db.addUser (username, password) db.removeUser(username) db.cloneDatabase(fromh...
查看所有的数据库:show dbs /show databases 切换数据库:use 数据库名 删除当前的数据库:db.dropDatabase() 2、mongodb集合的命令 不手动创建集合: 向不存在的集合中第⼀次加⼊数据时, 集合会被创建出来 手动创建结合: db.createCollection(name,options) db.createCollection("stu") db.createCollection("s...
show logs show the accessible logger names show log [name] prints out the last segment of log in memory, 'global' is default use <db_name> set current database db.foo.find() list objects in collection foo db.foo.find( { a : 1 } ) list objects in foo where a == 1 it result ...
show users show users in current database show profile show most recent system.profile entries with time >= 1ms show logs show the accessible logger names show log [name] prints out the last segment of log in memory, 'global' is default ...
Text SearchGreater & Less Than MongoDB...命令手册 MongoDB是一种基于文档的No-SQL非关系型数据库,在Github上面找到一个入门级的MongoDB命令手册教程,地址为:bradtraversy/mongodb_cheat_sheet.md...MongoDB Cheat Sheet Show All Databases show dbs Show Current Database db Create Or Switch Database use...
(1):开启服务:C:\mongodb\bin>mongod --dbpath=C:\mongodb\data (2):开启客户端:C:\mongodb\bin>mongo 127.0.0.1:27017 (3):查看所有的数据库:show dbs (4):use命令:use可以用来切换数据库,如果切换的数据库不存在,就会创建一个新的数据库 ...
current database show profile show most recent system.profile entries with time >= 1ms show logs show the accessible logger names show log [name] prints out the last segment of log in memory, 'global' is default use <db_name> set current database db.foo.find() list objects in ...
database namesshow collections show collections in current databaseshow users show users in current databaseshow profile show most recent system.profile entries with time >= 1msshow logs show the accessible logger namesshow log [name] prints out the last segment of log in memory, 'global' is ...
> show dbs 2 admin0.000GB 3 myshinynewdb0.000GB 4 local0.000GB There’s one more thing. How did theinsertcommand know to put the data into myshinynewdb? It turns out that when you entered theusecommand, then myshinynewdb became the current database on which commands operate. ...