mongodb 命令行操作

最近按照yapi官方教程装了mongodb和node.js

本地搭建了yapi,由于同事注册后忘记密码,只能去mongodb数据库去查

(https://www.cnblogs.com/malcolmfeng/p/6913878.html)

 

> show dbs;
admin   0.000GB
config  0.000GB
local   0.000GB
yapi    0.002GB

 

> use yapi
switched to db yapi


> show collections;
adv_mock
adv_mock_case
avatar
follow
group
identitycounters
interface
interface_case
interface_cat
interface_col
log
project
statis_mock
token
user
wiki

 

> db.user.find()
{ "_id" : 11, "study" : true, "type" : "site", "username" : "PHP"},

 

> db.user.remove({'_id':11})
WriteResult({ "nRemoved" : 1 })

你可能感兴趣的:(sql语句)