You can now run mongoDB commands./mongo --port 12345PRIMARY> use adminswitched to db adminPRIMARY> show dbs --> Shows the databases.local10.1982421875GBtest0.203125GBPRIMARY> db.help() --> Give list of Admin commandsDB methods:db.addUser(username, password[, readOnly=false])db.auth(username, password)db.cloneDatabase(fromhost)db.commandHelp(name) returns the help for the commanddb.copyDatabase(fromdb, todb, fromhost)db.createCollection(name, { size : ..., capped : ..., max : ... } )db.currentOp() displays the current operation in the dbdb.dropDatabase()db.eval(func, args) run code server-sidedb.getCollection(cname) same as db['cname'] or db.cnamedb.getCollectionNames()db.getLastError() - just returns the err msg stringdb.getLastErrorObj() - return full status objectdb.getMongo() get the server connection objectdb.getMongo().setSlaveOk() allow this connection to read from the nonmaster member of a replica pairdb.getName()db.getPrevError()db.getProfilingLevel() - deprecateddb.getProfilingStatus() - returns if profiling is on and slow threshold db.getReplicationInfo()db.getSiblingDB(name) get the db at the same server as this onedb.isMaster() check replica primary statusdb.killOp(opid) kills the current operation in the dbdb.listCommands() lists all the db commandsdb.logout()db.printCollectionStats()db.printReplicationInfo()db.printSlaveReplicationInfo()db.printShardingStatus()db.removeUser(username)db.repairDatabase()db.resetError()db.runCommand(cmdObj) run a database command. if cmdObj is a string, turns it into { cmdObj : 1 }db.serverStatus()db.setProfilingLevel(level,) 0=off 1=slow 2=alldb.shutdownServer()db.stats()db.version() current version of the serverdb.getMongo().setSlaveOk() allow queries on a replication slave serverdb.fsyncLock() flush data to disk and lock server for backupsdb.fsyncUnock() unlocks server following a db.fsyncLock()